Repository navigation
Conversation
…files, and how the signing workflows ran Reads the workflow files on each default branch and records every cosign sign step (kind of key, whether the image is named by digest, transparency log, whether the step can be skipped or fail quietly) and every verify step. For each workflow that signs, reads the runs in the window by outcome. Summary lists repositories that sign without verifying. KSI-SVC-VRI. Needs Contents for the files and Actions for the runs; include_runs: false reads the files only and leaves every run figure null. The workflow file reader and the newest-first run walk move from github_actions_security and github_workflow_runs into the shared client so the three fetchers use one copy. Their evidence is unchanged.
bruceweygandt
left a comment
There was a problem hiding this comment.
The cosign parser is careful and well tested. It handles quoting, ${{ }} expressions, || true, the key kinds, and the docker-publish starter workflow. The move of workflow_file_texts and newest_since into the shared client does not change the output of github_actions_security or github_workflow_runs.
There is one must-fix and two should-fixes.
1. Must-fix: fetcher.yaml text does not follow the format, so CI fails
fetchers/github/image_signing/fetcher.yaml:3-6 and :83-90
Problem. tests/test_contracts.py::test_fetcher_text_follows_the_format[fetchers/github/image_signing/fetcher.yaml] fails. This makes the test (py 3.11) and test (py 3.14) jobs fail. The test reports three errors:
- The description has 31 words. The limit is 30.
instructionsdoes not start withScript: github/image_signing/fetcher.pyon a line of its own.- After Script, the test expects Access, then
Commands Executed:on its own line, then Output, with a blank line between each. These sections are missing.
Why this is a problem. The PR cannot merge while CI fails. Also, the token permissions that the fetcher needs (Contents read and Actions read) are only in the PR description. The person who sets up the token reads instructions, not the PR.
Fix. Shorten the description to 30 words or fewer. Rewrite instructions in the same form as other fetchers, for example fetchers/github/workflow_runs/fetcher.yaml: Script, Access (Contents read; Actions read when include_runs is true), Commands Executed (the GraphQL workflow-file read and GET repos/{org}/{repo}/actions/workflows/{file}/runs), Output, and the summary fields.
2. Should-fix: run history counts pull request runs that do not sign
fetchers/github/image_signing/fetcher.py:218-234
Problem. run_history counts every run of a signing workflow, from every event and branch. Many signing workflows also run on pull_request. GitHub's docker-publish starter workflow is an example. On a pull request run, the sign step is skipped by if: github.event_name != 'pull_request', but the run still ends with success.
Why this is a problem. signing_workflow_runs_successful and latest_successful_signing_run then include runs that did not sign an image. The evidence can show recent successful signing when no image was signed in the window.
Fix. Do not count runs whose event is pull_request or pull_request_target. Or report the run counts per event, so a validator can choose. Add a test with a pull request run of a workflow whose sign step has that if:.
3. Should-fix: the summary does not show reusable workflow calls
fetchers/github/image_signing/fetcher.py:205-207 and :280-313
Problem. A job that calls a reusable workflow (jobs.<id>.uses) is recorded only in reusable_workflows_called on its workflow row. No summary field counts or lists these workflows. workflows_mentioning_cosign_without_a_cosign_command finds them only when the called path contains "cosign".
Why this is a problem. Many organizations sign images in one shared reusable workflow. A repository that signs this way reads as not signing, and the summary gives no sign that the evidence stops at that call.
Fix. Add a summary field that lists the workflows that call a reusable workflow, for example workflows_calling_reusable_workflows, in the same <repository>:<path> form as the other lists.
…ary format The contract test now checks every new fetcher's text format. Shorten the description to 30 words, write the instructions in the required blocks with every summary field, check them against the summary, and keep the 80-word cap only for old-style github instructions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MBcaFn4pMcbUNLVCX6bo1j
… list reusable workflow calls - Pull request runs (pull_request, pull_request_target) are left out of the signing run figures and counted apart in signing_workflow_pull_request_runs: a sign step is usually skipped on them while the run still succeeds, so they could show signing that never happened. - New summary field workflows_calling_reusable_workflows: signing done in a called workflow is not read, so the summary now says where the evidence stops. - Tests for both, README and CHANGELOG to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MBcaFptEwsTWWrKsxJfcyE
The description is under 30 words.
run_history leaves out pull_request and pull_request_target runs from total, successful, by_outcome and the latest_* fields.
New summary field workflows_calling_reusable_workflows, in the same : form as the other lists. |
…files, and how the signing workflows ran
Reads the workflow files on each default branch and records every cosign sign step (kind of key, whether the image is named by digest, transparency log, whether the step can be skipped or fail quietly) and every verify step. For each workflow that signs, reads the runs in the window by outcome. Summary lists repositories that sign without verifying. KSI-SVC-VRI.
Needs Contents for the files and Actions for the runs; include_runs: false reads the files only and leaves every run figure null.
The workflow file reader and the newest-first run walk move from github_actions_security and github_workflow_runs into the shared client so the three fetchers use one copy. Their evidence is unchanged.