Add per-language supply chain attack prevention via default cooldowns#3791
Add per-language supply chain attack prevention via default cooldowns#3791pid1 wants to merge 4 commits into
Conversation
|
pnpm minimumReleaseAge was introduced in v10, would it not be FP for < 10 ? May be we can edit the message? |
Address PR semgrep#3791 feedback: - uv pyproject rule no longer requires [tool.uv] section to be present, as uv can be used without it. Regex broadened to match any TOML section header or key-value line. Confidence lowered to LOW. New rules: - npmrc-missing-min-release-age: flags .npmrc files without min-release-age set, also recommends ignore-scripts=true - bunfig-missing-minimum-release-age: flags bunfig.toml files without minimumReleaseAge set under [install] Test fixes: - Consolidate test cases into single .generic files per rule, removing separate .txt files that caused semgrep --test failures (test framework requires ruleid annotations in each test file)
|
You currently don't have a lot of |
|
Overall, very useful contribution and well authored rules. Metadata and messages are great, path scoping is good. |
|
@diptendur2c That was explicitly removed as per this feedback. |
Co-authored-by: Pieter De Cremer (Semgrep) <pieter@r2c.dev>
|
@diptendur2c updated the |
|
Thanks for this contribution, Jonathan. You were ahead of the curve in identifying cooldown rules as important, and the metadata and messaging across your rules are well done. Since your PR was opened, however, we received an overlapping PR in #3805 that covers much of the same ground. After comparing both, I've decided to move forward with #3805 as the base because it uses language-aware parsers ( That said, your PR has two rules that #3805 does not cover:
Thank you again for the contribution and for driving the discussion on this topic. |
Require cooldowns or minimum release ages before updating to newly published package versions.
This covers:
Additionally, detect unpinned dependencies in Python scripts using uv’s inline script metadata format.