Repository navigation
Description
Problem
devops ci audit checks uv.lock and the Node lock files. It does not check the hashed requirement files of the tools lock. devops research advisories (#3898) found seven advisories on 2026-11-07 in src/devops_cli/tools_lock/semgrep.txt, and osv-scanner 2.6.0 reports the same ids for that file:
certifi2026.7.22: GHSA-6q48-6c7w-9gw2 (CRITICAL), fixed in 2026.10.18, and PYSEC-2026-4320mcp1.29.0: GHSA-5h93-6whr-6q8j, GHSA-84m7-p3x7-pcfv, GHSA-rwrf-2pqf-9j8j, GHSA-w4fh-qvv9-3v23 (MEDIUM), fixed in 1.30.0opentelemetry-api1.37.0: GHSA-xcq7-p3pf-p88h
Semgrep runs in the review sandbox with no network, so the effect is limited, but the pins are old and no check shows them.
Expected
The pins of the requirement files of the tools lock have no known advisory, or each one that has no released fix has a time-limited ignore (SECURITY.md, "A Finding with No Fix"). A check fails when a requirement file of the tools lock holds an advisory, so the problem cannot return.
Acceptance criteria
src/devops_cli/tools_lock/semgrep.txtis compiled again from the pinned Semgrep version, andbandit.txtis checked too.devops ci audit(or the check that runs it) reads the requirement files of the tools lock, for example withosv-scanner --lockfile requirements.txt:<file>, and fails on an advisory. A test shows that a requirement file with a pin that has an advisory fails the check.- If a newer Semgrep release is needed to take the fixed
mcpandcertifi, the issue names it and follows the two-week release rule.
Existing tool considered
osv-scanner 2.6.0 reads requirements.txt files with the --lockfile requirements.txt:<path> form (checked on 2026-11-07). devops research advisories (#3898) is a second way to find the same ids.
Related
Found by #3898. Related: devops ci audit, devops scan fix, #2013.
Proposed design
Problem statement
The audit checks uv.lock and the Node lock files. It does not check the hashed requirement files of the tools lock. Seven advisories affect pins in semgrep.txt, and no check shows them. Add osv-scanner coverage for every tools-lock requirement file and refresh the pins.
Acceptance criteria
Requirement: Tools lock files are regenerated
Each hashed requirement file in src/devops_cli/tools_lock/ SHALL be generated from the tool version pinned in the tools lock, not edited by hand.
Scenario: Semgrep and Bandit files are regenerated
- WHEN the tools-lock compiler runs for the pinned Semgrep and Bandit versions
- THEN
src/devops_cli/tools_lock/semgrep.txtandsrc/devops_cli/tools_lock/bandit.txtmatch the compiler output
Requirement: Audit scans the tools lock
devops ci audit SHALL scan every requirement file under src/devops_cli/tools_lock/ with osv-scanner.
Scenario: Audit scans each requirement file
- WHEN
devops ci auditruns on a tools lock withsemgrep.txtandbandit.txt - THEN the audit calls
osv-scanner --lockfile requirements.txt:<file>for each file and reports each file scanned
Requirement: Audit fails on an advisory
devops ci audit SHALL fail when a requirement file of the tools lock holds a pin with a known advisory.
Scenario: A pin has an advisory
- WHEN a requirement file under
src/devops_cli/tools_lock/contains a pin that osv-scanner reports with an advisory - THEN
devops ci auditexits non-zero and names the file, package and advisory id
Requirement: Audit passes without an advisory
devops ci audit SHALL pass when osv-scanner reports no advisory for every requirement file of the tools lock.
Scenario: No advisory in the tools lock
- WHEN osv-scanner reports no advisory for every requirement file under
src/devops_cli/tools_lock/ - THEN
devops ci auditexits zero and reports each file scanned
Requirement: No-fix finding has a time-limited ignore
A finding with no released fix SHALL pass the audit only with a time-limited ignore that names the advisory, file, reason and expiry.
Scenario: An ignore has expired
- WHEN osv-scanner reports a tools-lock advisory with no fixed version and its ignore expiry is before the run date
- THEN
devops ci auditexits non-zero and reports the expired ignore
Requirement: Semgrep release is named
If the pinned Semgrep version cannot take mcp 1.30.0 and certifi 2026.10.18, the change SHALL name the next Semgrep release that can or the upstream release that blocks it.
Scenario: Pinned Semgrep cannot take the fixed packages
- WHEN the pinned Semgrep version cannot use
mcp1.30.0 andcertifi2026.10.18 - THEN the proposal names the required Semgrep release and
tasks.mdrecords the two-week release wait
Existing Tool Considered
No alternatives check has run. osv-scanner 2.6.0 covers Python requirements.txt files with --lockfile requirements.txt:<path> and reports the same advisory ids. It lacks the tools-lock compiler, the pin updates and the time-limited ignore policy. devops ci audit must call it.
Key questions
- Where should the tools-lock advisory check run?: Extend
devops ci auditto scan every*.txtfile undersrc/devops_cli/tools_lock/with the existing osv-scanner adapter. The check runs in CI as a gate and fails on any advisory. (best practice) [sources: docs/adr/0004-ci-is-the-authoritative-gate.md, tests/security/test_osv_scanner.py]- Chosen: Extend
devops ci audit. The audit is the existing CI gate and the osv-scanner adapter already parses advisories. - Rejected: Add a separate
devops ci audit-tools-lockcommand. It adds a second entry point and a second CI job for the same need. - Rejected: Rely on
devops research advisories. It is a research command, not a gate, and the pins went unseen.
- Chosen: Extend
- Which tools-lock files must the check scan?: Scan every
*.txtrequirement file undersrc/devops_cli/tools_lock/, includingsemgrep.txtandbandit.txt. Discover the files from the directory so a new tool is covered without a code change. (best practice) [sources: src/devops_cli/tools_lock/semgrep.txt, src/devops_cli/tools_lock/bandit.txt]- Chosen: Directory scan of
src/devops_cli/tools_lock/*.txt. It coverssemgrep.txt,bandit.txtand future tools-lock files. - Rejected: Hard-coded list of
semgrep.txtandbandit.txt. A new tool would need a code change and could be missed. - Rejected: Only
semgrep.txt. The issue requiresbandit.txttoo.
- Chosen: Directory scan of
- How should the check call osv-scanner for a requirement file?: Call
osv-scanner --lockfile requirements.txt:<file>for each file and parse the JSON output through the existing osv-scanner adapter. A non-zero exit with an advisory fails the audit. (best practice) [sources: tests/security/test_osv_scanner.py, docs/adr/0005-review-findings-come-from-tools-not-models.md]- Chosen: Reuse the osv-scanner adapter. The adapter already reads osv-scanner reports and the issue confirms the
requirements.txt:<file>form. - Rejected: Use
devops research advisories. It is a second path and not the CI gate. - Rejected: Parse
requirements.txtand query OSV by hand. It rebuilds what osv-scanner already does.
- Chosen: Reuse the osv-scanner adapter. The adapter already reads osv-scanner reports and the issue confirms the
- How should a finding with no released fix be handled?: Accept only a time-limited ignore in the
SECURITY.md"A Finding with No Fix" format, with the advisory id, file, reason and expiry. The audit fails when the expiry has passed. (best practice) [sources: SECURITY.md]- Chosen: Time-limited ignore with expiry. The issue allows it and the project policy requires a reason and an expiry.
- Rejected: Fail until a fix exists. It blocks the audit for a long time and ignores the documented policy.
- Rejected: Silently suppress the finding. It hides the advisory and breaks the audit's purpose.
- How should
semgrep.txtbe regenerated?: Regeneratesemgrep.txtwith the repository's tools-lock compiler from the pinned Semgrep version. Do not edit the hashed file by hand. Regeneratebandit.txtin the same way. (best practice) [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md, src/devops_cli/tools_lock/semgrep.txt]- Chosen: Use the existing tools-lock compiler. The ADR requires hashed requirements and the file is generated, not hand-kept.
- Rejected: Edit the pins and hashes by hand. It is error-prone and cannot reproduce the hashes.
- Rejected: Leave the old file. It keeps the old pins and the advisories.
- Which Semgrep version should the change pin?: Use the newest Semgrep release that can take
mcp1.30.0 andcertifi2026.10.18. If no release can, keep the current pin, add the time-limited ignore, and name the blocking Semgrep release. (best practice) [sources: src/devops_cli/tools_lock/semgrep.txt]- Chosen: Newest Semgrep that takes both fixed packages. It clears the two fixed advisories without an ignore.
- Rejected: Keep the current pin and ignore. Use it only when no Semgrep release takes both fixed packages.
- Rejected: Pin Semgrep without checking its dependencies. It can keep or add advisories.
- Does the change need a dependency on feat(research): find advisories for every pin #3898?: No. The check uses osv-scanner directly. feat(research): find advisories for every pin #3898 is the research path that found the advisories and remains a related item. (best practice) [sources: tests/research/test_advisories.py, tests/security/test_osv_scanner.py]
- Chosen: No dependency. The audit can use osv-scanner without the research command.
- Rejected: Depend on feat(research): find advisories for every pin #3898. The check does not call the research command.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-09: in-use.
The item already names this tool.
Tool: google/osv-scanner (https://github.com/google/osv-scanner), Apache-2.0, last activity 2026-11-09, maintained.
Activity
dan-petty commentedon Nov 7, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(deps)scope of the title gives the scope.The advisories are real but the tools run in a no-network sandbox, so the risk is limited and not actively exploitable.The advisory GHSA-6q48-6c7w-9gw2 does not set P0: the author has no write access, and no caller attached it as evidence. A person can set P0 with the label priority/p0-critical.It prevents advisory regressions in tools lock files and closes a gap in the audit check, but the immediate user impact is low.Requires integrating osv-scanner into the CI audit path, adding a test, and possibly updating pins in semgrep.txt and bandit.txt.Both check for advisories in pinned packages, but #3898 delivers a research command and the candidate delivers a CI audit check that fails on tools lock requirement files.devops-cli-service commentedon Nov 8, 2026
Status set to Ready at 1f03ee3 (see proposed design in issue body).
devops-cli-service commentedon Nov 9, 2026
Alternatives check: in-use
Reason: The issue already names osv-scanner, and the project has an osv-scanner adapter. It is maintained (last push 2026-11-09, release v2.7.1) and reads hashed requirements files with
--lockfile requirements.txt:<file>. It covers the advisory detection. It does not recompile the lock files or wire the check intodevops ci audit, and the issue does not need it to. The web search returned nothing useful, so this rests on the repository facts and the issue text.The item already names this tool.
Tool: google/osv-scanner (https://github.com/google/osv-scanner)
Covers:
Lacks:
devops ci auditor discover the tools_lock filesTools considered:
Searches run:
Sources:
Checked on 2026-11-09. A person decides what this means for the item. The check changes no label and closes no issue.
dan-petty commentedon Nov 16, 2026
New evidence from #6032 (2026-11-16):
mcp==1.29.0andopentelemetry-api~=1.37.0(PyPI metadata). So no release of semgrep holds the fixes yet.semgrep.inwith--upgrade-package=mcp==1.30.0or--upgrade-package=opentelemetry-api==1.45.2.PR #6040 holds the two fixes in
.github/renovate.jsonwhile the semgrep lock is below the fix, and the Dependency Dashboard footer names this issue. The hold ends by itself when the lock takes the fix. Thentest_renovate_holds_the_security_fixes_that_the_semgrep_pins_blockfails, and the hold is deleted.dan-petty commentedon Nov 16, 2026
Owner, 2026-11-16: approved the two holds of this pull request (the
mcpandopentelemetry-apisecurity fixes in the semgrep tools lock only, while semgrep pins the vulnerable versions; #3988 owns the real fix). The holds end by themselves when the lock moves past the fix, and a test then asks for their removal.fix(deps): Make the four failed Renovate updates work (#6040)
fix(deps): check the tools lock requirement files for advisories
fix(deps): check the tools lock requirement files for advisories
devops-cli-service commentedon Nov 18, 2026
Released in v0.177.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.177.0
devops-cli-service commentedon Nov 18, 2026
Live since 2026-11-18 16:28 UTC