Skip to content

ci: compile the semgrep requirements, so Dependabot proposes sets pip can install - #188

Merged
donislawdev merged 1 commit into
mainfrom
ci/semgrep-pip-compile
Oct 15, 2026
Merged

donislawdev merged 1 commit into
mainfrom
ci/semgrep-pip-compile

Conversation

@donislawdev

Copy link
Copy Markdown
Owner

Replaces #184, which cannot be fixed in place.

Why #184 is red. Dependabot raised every line of .github/requirements-semgrep.txt on its own, past what semgrep allows. It moved 21 packages, boltons to 26.2.0 among them, while semgrep 1.180.0 asks for boltons~=21.0, and pip refused the whole set (ResolutionImpossible). The group kept the lines in one pull request but did not make them agree, and it would happen again with the next major of any dependency.

What changes

  • .github/requirements-semgrep.in holds the one line a person writes, semgrep==1.180.0, and the reasons that stood at the top of the list, with the command that compiles it by hand.
  • .github/requirements-semgrep.txt is compiled from it by pip-compile. An .in file in the directory makes Dependabot run pip-compile itself, so what it proposes is a set pip resolved.
  • dependabot.yml says so next to the group.

Checked

  • Compiled with Python 3.14.8, pip 26.1.1 and pip-tools 7.5.3 (the versions Dependabot runs): the same 66 versions the freeze had, so none of the 21 in build(deps): bump the semgrep group in /.github with 21 updates #184 is inside what semgrep allows. Only the spelling of two names moves (ruamel.yaml as ruamel-yaml).
  • A clean install from the compiled file works, semgrep --version prints 1.180.0, and pip freeze of that install equals the compiled list.
  • CI still installs from requirements-semgrep.txt, unchanged.

Not checked: whether the dependency review job reads the .in file as a manifest - this pull request's run shows it.

🤖 Generated with Claude Code

… can install

Dependabot raised every line of .github/requirements-semgrep.txt on its own,
past what semgrep allows: #184 moved 21 packages, boltons to 26.2.0 among
them, while semgrep 1.180.0 asks for boltons~=21.0, and pip refused the
whole set. Grouping kept them in one pull request but did not make them
agree.

semgrep is now pinned in requirements-semgrep.in, the one line a person
writes, and the list beside it is compiled from it by pip-compile. An .in
file in the directory makes Dependabot run pip-compile itself, so what it
proposes is a set pip resolved. Compiled today with Python 3.14, pip 26.1.1
and pip-tools 7.5.3, the versions Dependabot runs, the list is the same 66
versions the freeze had - none of the 21 in #184 is inside what semgrep
allows. Only the spelling of two names moves (ruamel.yaml as ruamel-yaml).

The reasons that stood at the top of the list moved to the .in file, with
the command that compiles it by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI (base), Organization UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 07b776ac-9be4-4aef-919f-b5248be8db13
📥 Commits

Reviewing files that changed from the base of the PR and between 127db94 and c672afd.

📒 Files selected for processing: 3
  • .github/dependabot.yml
  • .github/requirements-semgrep.in
  • .github/requirements-semgrep.txt
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@donislawdev
donislawdev merged commit 0a3fe12 into main Oct 15, 2026
23 checks passed
@donislawdev
donislawdev deleted the ci/semgrep-pip-compile branch October 15, 2026 12:03
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.

1 participant