Repository navigation
Description
Problem
devops research advisories cannot match a GitHub Action that a workflow pins to a commit and a major tag. In this repository 47 of 80 Action pins read uses: <action>@<commit> # v7. The version of the component is v7, which names no one release, so the command counts the pin in unpinned and checks no advisory for it. A range such as < 7.5 or >= 7.2 needs the exact release of the commit.
Expected
The command finds the release that a pinned commit belongs to, and matches that release to the advisories of the Action, as it does for a pin that names a full release.
Acceptance criteria
- The inventory keeps the pinned commit of an Action beside its version.
- For a pin with a commit and a version that is not a full release, the command reads the tags of the Action's repository (
GET /repos/{owner}/{repo}/tags,api.github.com, already approved as an egress destination) and takes the highest full release tag that points to the commit. - Tests with recorded responses: a commit with a full release tag gives that release; a commit with none stays
unpinned; a failed read is a failure and not a clean pin. - The number of extra requests for this repository is stated in the pull request, against the limit of 60 requests an hour without a token.
Existing tool considered
GitHub REST API for tags, through the client of #3987. ratchet and Dependabot already pin Actions to a commit, but they do not report advisories. No new scanner is built.
Related
Follows #3987. Related: #3898, #3932.
Proposed design
Problem statement
The research advisories command cannot match a GitHub Action pinned to a commit and a major tag. The major tag names no one release, so the command counts the pin as unpinned and checks no advisory. The change resolves the pinned commit to the highest full release tag and feeds that release to the existing advisory match.
Acceptance criteria
Requirement: Pinned commit in inventory
The Action inventory SHALL keep the pinned commit beside the version for every pin that names a commit.
Scenario: Commit is retained
- WHEN The inventory reads a workflow pin
uses: owner/action@<commit> # v7. - THEN The Action pin record holds the commit and the version
v7.
Requirement: Highest full release from tags
For a pin with a commit and a version that is not a full release, the command SHALL read the Action repository tags from GET /repos/{owner}/{repo}/tags and select the highest full semantic version release tag that points to the commit.
Scenario: Highest release wins
- WHEN The tags response holds full release tags
v7.2.0andv7.2.1for the pinned commit andv7.3.0for another commit. - THEN The command resolves the pin to
v7.2.1.
Requirement: Tags read across pages
The command SHALL read successive tags pages until it finds the pinned commit or the response has no next page.
Scenario: Commit on a later page
- WHEN The first tags page holds no tag for the pinned commit and the second page holds full release tag
v7.2.1for it. - THEN The command resolves the pin to
v7.2.1.
Requirement: No release stays unpinned
A pin whose commit has no full release tag SHALL remain in unpinned.
Scenario: Commit without release tag
- WHEN The tags response holds no full release tag that points to the pinned commit.
- THEN The pin remains in
unpinnedand no advisory check runs for it.
Requirement: Failed tags read fails command
A failed tags read SHALL fail the command and SHALL NOT report the pin as a clean pin.
Scenario: Tags request fails
- WHEN The tags request returns an error or a non-success status.
- THEN The command exits with a failure that names the Action repository and does not report the pin as clean.
Requirement: Extra request count stated
The change SHALL state the measured number of extra tags requests for this repository against the 60 requests an hour limit without a token.
Scenario: Request count is recorded
- WHEN The change is complete.
- THEN The change's
proposal.mdstates the measured number of extra tags requests and compares it with the 60 requests an hour limit.
Existing Tool Considered
No alternatives check has run. The GitHub REST API GET /repos/{owner}/{repo}/tags, through the client of #3987, covers the tag-to-commit read. It lacks advisory matching. ratchet and Dependabot pin Actions to a commit but report no advisories. The change builds no new scanner.
Key questions
- Which GitHub endpoint supplies the tags and commit SHAs?: Use
GET /repos/{owner}/{repo}/tagsthrough the existing GitHub REST client from feat(research): add GitHub advisories and KEV to advisories #3987. (best practice) [sources: src/devops_cli/commands/research.py]- Chosen: GitHub REST tags endpoint. It returns each tag name and its commit SHA, and the endpoint is approved egress.
- Rejected: GitHub GraphQL refs query. It needs a new query shape and gives no simpler tag-to-commit read.
- Rejected: Git
ls-remote. It needs a separate transport and token path.
- How does the command choose the release from the tags?: Choose the highest full semantic version tag whose
commit.shaequals the pinned commit. A full release tag has major, minor and patch and no prerelease suffix. Ignore major-only tags and non-version tags. (best practice) [sources: src/devops_cli/research/advisories.py]- Chosen: Highest full release tag. A full release gives the exact version that an advisory range needs, and semver gives a total order.
- Rejected: First matching tag. Tag order is not semantic, so it can choose an older release.
- Rejected: Major tag only. A major tag names no one release and cannot match a range.
- Rejected: Accept prerelease tags. A prerelease is not a full release and can give a version that no user runs.
- Where does the inventory store the pinned commit?: Add an optional
commitfield to the Action pin record insrc/devops_cli/research/models.py. Fill it from the workflow pin. (best practice) [sources: src/devops_cli/research/models.py, src/devops_cli/research/advisories.py]- Chosen: Optional commit field on the Action pin. It keeps existing pins valid and records the commit only when present.
- Rejected: Separate commit map. It adds a second structure and more code to keep in step.
- Rejected: Parse the commit on demand. It repeats workflow parsing and breaks the inventory contract.
- How does the command keep the extra requests under the 60 an hour limit?: Read tags once per distinct Action repository in one run. Paginate only while the commit is not found. State the measured count in the pull request. (best practice) [sources: src/devops_cli/research/advisories.py]
- Chosen: Per-repository in-run cache. It avoids one request per pin and stops pagination when the commit is found.
- Rejected: One request per pin. The 47 pins can exceed the 60 request limit.
- Rejected: Fetch all tags for all actions. It wastes requests and can exceed the limit.
- What does a failed tags read do to the result?: Fail the command with an error that names the Action repository. Do not report the pin as clean. (best practice) [sources: src/devops_cli/research/advisories.py, src/devops_cli/lang/en/messages.py]
- Chosen: Fail the command. A failed read leaves the release unknown, so a clean result would be false.
- Rejected: Treat the pin as unpinned. It hides an operational failure and checks no advisory.
- Rejected: Retry without a limit. It can exceed the rate limit and delay the command.
- How does the resolved release reach the advisory match?: Replace the pin version with the resolved full release before the existing advisory range check. (best practice) [sources: src/devops_cli/research/advisories.py, src/devops_cli/research/models.py]
- Chosen: Resolve before matching. It reuses the existing advisory matcher and changes no range logic.
- Rejected: Teach the matcher about commits. It puts GitHub API knowledge in the matcher and duplicates resolution.
- Rejected: Match only the major version. It cannot answer a range such as
< 7.5or>= 7.2.
- How do the tests read GitHub responses without network access?: Use recorded HTTP responses in
tests/research/test_advisories.py. Cover a full release tag, no full release tag and a failed read. (best practice) [sources: tests/research/test_advisories.py, src/devops_cli/research/advisories.py]- Chosen: Recorded responses. The existing advisory tests use recorded responses and need no network.
- Rejected: Live GitHub calls. They need a token and network, and they are not deterministic.
- Rejected: Mock only the client method. It can pass without checking the HTTP response shape.
- How many tag pages does the command read?: Read successive pages until the pinned commit is found or the response has no next page. Stop at the first page that holds the commit. (best practice) [sources: src/devops_cli/research/advisories.py]
- Chosen: Paginate until found or exhausted. The commit can be on a later page, and the read stops as soon as it is found.
- Rejected: First page only. A repository with many tags can miss the commit.
- Rejected: Read every page always. It wastes requests after the command finds the commit.
- Does the change build a new scanner?: No. The change extends the existing research advisories path and uses the GitHub REST client. (best practice) [sources: src/devops_cli/research/advisories.py, src/devops_cli/commands/research.py]
- Chosen: Extend existing advisories path. It reuses the existing advisory match and needs no new scanner.
- Rejected: Add a new scanner. It duplicates the advisory path and adds maintenance cost.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
Alternatives check of 2026-11-10: partly.
Tool: zizmorcore/zizmor (https://github.com/zizmorcore/zizmor), MIT, 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.
featprefix of the title gives the type.(research)scope of the title gives the scope.It unblocks advisory matching for 47 of 80 pins but does not block the core command.A large share of Action pins stay unchecked for advisories until this lands.It needs a tags API call, tag-to-commit resolution logic, edge-case handling, and recorded-response tests.Both work on the advisories command and use the GitHub API client from #3987, but #3987 adds the advisory source while this candidate resolves commit pins to a release so that source can match them.devops-cli-service commentedon Nov 8, 2026
Status set to Ready at 2335754 (see proposed design in issue body).
devops-cli-service commentedon Nov 10, 2026
Alternatives check: partly
Reason: My searches returned only unrelated pages, so I could not read zizmor's docs. From prior knowledge, zizmor's known-vulnerable-actions audit maps commit-pinned Actions to a tag and checks them against GitHub advisories. This is unconfirmed here. The repository facts confirm that zizmor is open and maintained. It is a standalone scanner, not a library for the project's
devops research advisoriesinventory, so it covers the need only in part. The tags-endpoint approach in the issue is small and reuses the #3987 client.Tool: zizmorcore/zizmor (https://github.com/zizmorcore/zizmor)
Covers:
Lacks:
unpinnedaccountingTools considered:
Searches run:
Sources:
Checked on 2026-11-10. A person decides what this means for the item. The check changes no label and closes no issue.
25 remaining items
devops-cli-service commentedon Nov 20, 2026
Pull request #6490 is ready for review. The checks passed.
Spend: 209 model requests, 16367529 input tokens, 98941 output tokens.
feat(research): Keep the pinned commit of an Action in the inventory (#…
feat(research): Select the highest full release tag of a commit (#4012)
feat(research): Read the tags of an Action repository (#4012)
feat(research): Resolve a pinned commit before the advisory match (#4012
docs(openspec): archive the change (#4012)
fix(research): Read the tags of a sub-path Action from its repository (…
test(research): Read the tags of actions/checkout that GitHub gave (#…
devops-cli-service commentedon Nov 20, 2026
Released in v0.183.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.183.0
devops-cli-service commentedon Nov 20, 2026
Live since 2026-11-20 16:25 UTC