Skip to content

chore(tools): update semgrep past 1.182.0 when an Intel-Mac wheel returns #6100

Not planned

Description

@devops-cli-service

Split from #5083.

semgrep 1.183.0 and later publish no Intel-Mac wheel, so the compiled src/devops_cli/tools_lock/semgrep.txt has 7 hashes in place of 8 and devops install-tools --tool semgrep fails on darwin-amd64. This issue waits on upstream semgrep publishing an Intel-Mac wheel again. It is deferred from #5083 so that the scanner record route and the osv-scanner, pluto and tflint updates can land.

Acceptance criteria:

  • The tools lock pins the newest semgrep release whose compiled requirements file lists the Intel-Mac wheel, and src/devops_cli/tools_lock/semgrep.txt holds the matching hashes.
  • The semgrep clean run in tests/fixtures/scanner_runs/recorded_runs.json and the semgrep canary output in tests/fixtures/review_canary/recorded_outputs.json are recorded again with the new pin inside pytest.
  • tests/security/test_scanner_contract.py::test_each_recording_is_of_the_version_the_tools_lock_pins passes with the new pin.
  • src/devops_cli/review/rules/rules.lock names the new semgrep version, and tests/commands/test_review_rules_pack.py passes.
  • devops install-tools --tool semgrep installs the pin on darwin-amd64.

Proposed design

Problem statement

semgrep 1.183.0 and later publish no Intel-Mac wheel. The darwin-amd64 install of semgrep fails with a missing hash, so the repository cannot move its semgrep pin past 1.182.0. When upstream publishes the wheel again, the pin, the two scanner recordings and the rule pack move to the new release.

Acceptance criteria

Requirement: Semgrep pin has an Intel-Mac wheel

The semgrep version that the repository pins SHALL be the newest release whose requirements file lists the darwin-amd64 wheel.

Scenario: Install of the pinned semgrep on darwin-amd64

  • WHEN the pinned semgrep is installed on darwin-amd64 and semgrep --version runs
  • THEN the command prints the pinned release and the install reports no missing hash.

Requirement: Scanner recordings hold the new semgrep run

The semgrep entries of tests/fixtures/scanner_runs/recorded_runs.json and tests/fixtures/review_canary/recorded_outputs.json MUST state the pinned release.

Scenario: Scanner contract test replays the new recordings

  • WHEN uv run pytest tests/security/test_scanner_contract.py runs
  • THEN every case passes, and the semgrep cases replay the re-recorded run and the re-recorded canary output.

Requirement: Rule pack passes with the installed semgrep

The review rule pack MUST pass its check with the pinned semgrep on PATH.

Scenario: Rule pack check under the pinned semgrep

  • WHEN uv run devops review rules test --check runs with the pinned semgrep on PATH
  • THEN the command exits 0 and prints the pinned semgrep version.

Requirement: Rules lock holds no semgrep version

src/devops_cli/review/rules/rules.lock MUST hold no semgrep version, and RulesLock MUST refuse a semgrep_version field.

Scenario: Lock entry with a semgrep version does not load

  • WHEN uv run pytest tests/commands/test_review_rules_pack.py::test_a_lock_entry_with_a_semgrep_version_does_not_load runs
  • THEN the case passes, and the model raises a validation error that names semgrep_version.

Existing Tool Considered

No alternatives check has run. semgrep is the open, maintained scanner that the repository already pins, and it covers the need: this item moves its pin and builds no code. The work waits on upstream semgrep, which publishes no darwin-amd64 wheel from 1.183.0.

Key questions

  • Does src/devops_cli/review/rules/rules.lock name the semgrep version?: No. The lock holds rule_file, rule_sha256, test_file and test_sha256 for each rule. RulesLock refuses a semgrep_version field, because the installed semgrep states its own version (refactor(tools): read tool versions from the installed tool #4388). The body criterion that the lock names the new version cannot be built. [sources: src/devops_cli/review/rules/rules.lock, src/devops_cli/review/rules_pack.py:42, tests/commands/test_review_rules_pack.py]
  • Does the compiled tools lock still exist at src/devops_cli/tools_lock/semgrep.txt, and does the body hash-count criterion hold?: No. ADR 0005 records that the tools lock is gone since chore(tools): remove devops install-tools and tools.lock #4363: the devtools image installs the review tools, and a review profile hashes the versions of its tool runs. The criterion that src/devops_cli/tools_lock/semgrep.txt holds 8 hashes cannot be built as written. [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md]
  • Where does the repository pin the semgrep version now?: The devtools image installs the review tools, so the pin lives there and not in a tools lock (ADR 0005 status history, chore(tools): remove devops install-tools and tools.lock #4363). Refine confirms the exact file at the head commit before implementation. [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md]
  • Does tests/security/test_scanner_contract.py hold the case test_each_recording_is_of_the_version_the_tools_lock_pins?: No. The module holds four cases: the adapter replay, the registry fallback, the fake's PATH answer and the canary answer. No case reads a version from a lock. The body criterion that names that case cannot be built. [sources: tests/security/test_scanner_contract.py]
  • Which proof shows that the recordings and the rule pack use the new semgrep?: Re-record both fixtures through the scanner fake inside pytest, and run the rule pack check with the installed semgrep on PATH. No test reads a lock file, and the rule pack test uses a stand-in semgrep, so the live check is the proof of the installed version. (best practice) [sources: tests/security/test_scanner_contract.py, tests/commands/test_review_rules_pack.py]
    • Chosen: Re-record inside pytest and run the rule pack check live. The scanner contract test replays each recording through the adapter, and the live check runs the real binary.
    • Rejected: A pytest test that reads the pinned version from a lock file. The tools lock is gone, no test reads a lock file, and a test cannot show an install.

Fit

Fits in one pull request.

Suspected block

Upstream semgrep must publish a darwin-amd64 wheel for a release later than 1.182.0.

Dependencies

None.

Activity

  1. added
    type/chore
    source/agent
    status/new
    value/medium
    effort/low
    on Nov 17, 2026
  2. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    ContributorAuthor
  3. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: Upstream semgrep must publish an Intel-Mac (darwin-amd64) wheel for a release later than 1.182.0.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  4. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: See Suspected block in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  5. dan-petty commented on Nov 26, 2026

    @dan-petty
    Owner

    Closed: devops-cli no longer pins or installs semgrep.

    #6555 deleted devops install-tools and the tools lock, so no darwin-amd64 install can fail here. dan-petty/devtools pins semgrep 1.187.0 for its Linux image. The scanner recordings are no longer tied to a version pin.

  6. removed
    status/new
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumsource/agenttype/chorevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions