Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve detection for Python setuptools backdoors #164

Merged
merged 18 commits into from May 13, 2024

Conversation

tstromberg
Copy link
Collaborator

@tstromberg tstromberg commented Apr 24, 2024

Our Python rules didn't reliably match the use of "setuptools"; often we'll use the fact that the script is a library installer to up the suspicion level.

This does add a private rule that we copy around to a couple of files. The lack of re-use isn't great, and neither is the private rule behavior. The use of a private rule means we're unable to see or extract the strings related to it and present it to the user.

This also fixes a misfeature in report.go where we'd use the longest rule match description even if the rule had less criticality. This was being seen in the py_setuptools backdoor combo rule.

@tstromberg tstromberg marked this pull request as draft April 24, 2024 09:40
Evan Gibler and others added 11 commits May 2, 2024 06:51
* Fix GoReleaser

* Add project_name

* Remove problematic MS repository from Checks

* Repository has been fixed
)

* Add URLs to markdown output

* run prettier against output
…d-dev#171)

Bumps the all group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 4.1.3 to 4.1.4
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@1d96c77...0ad4b8f)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add ThreatHunting-Keywords-yara-rules

* Update README

* Remove superfluous mkdir command

* Fix tests

* Fix tests

* Remove merge artifacts

* Pin rules to a known commit; add check for updates

* Re-add -s

* Avoid using jq for portability

* Add new commit to output

* Fix test
…v#172)

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 4.0.0 to 5.0.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@3cfe3a4...82d40c2)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Thomas Strömberg <t+github@chainguard.dev>
Co-authored-by: Ville Aikas <11279988+vaikas@users.noreply.github.com>
@tstromberg tstromberg changed the title Improve reliability of py_setuptools rules Improve reliability of rules that search for Python setuptools May 7, 2024
@tstromberg tstromberg changed the title Improve reliability of rules that search for Python setuptools Improve Python detection, particularly for setuptools May 7, 2024
@tstromberg tstromberg changed the title Improve Python detection, particularly for setuptools Improve Python detection, particularly around setuptools May 7, 2024
@tstromberg tstromberg marked this pull request as ready for review May 7, 2024 02:43
@tstromberg tstromberg requested review from vaikas and egibs May 7, 2024 02:43
@tstromberg tstromberg marked this pull request as draft May 9, 2024 00:31
@tstromberg tstromberg marked this pull request as ready for review May 13, 2024 20:47
@tstromberg tstromberg changed the title Improve Python detection, particularly around setuptools Improve detection for Python setuptools backdoors May 13, 2024
@tstromberg tstromberg merged commit 5a95dc0 into chainguard-dev:main May 13, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant