Skip to content

ci: hash-pin workflow installs and scope publish's write to its job (SEC-5) - #12

Merged
jothimani-rajendran merged 1 commit into
mainfrom
sec-5-code-scanning
Oct 17, 2026
Merged

jothimani-rajendran merged 1 commit into
mainfrom
sec-5-code-scanning

Conversation

@jothimani-rajendran

Copy link
Copy Markdown
Collaborator

SEC-5 (org-plan plan/sec-scan-2026-10-16.md): clear the code-scanning findings in this repo's workflows.

These workflows are hand-maintained in each plugin repo, not emitted by open-coder-ai/chock (the emitter writes the plugin trees, index, lockfile and PLUGINS.md; nothing under .github/workflows/), so the fix lands here.

Changes

  • Hash-pinned framework install (generated-only.yml, publish.yml): dependencies install from .github/requirements/framework.txt (pip-compile --allow-unsafe --generate-hashes --strip-extras, Python 3.12, from framework.in) with --require-hashes. The framework checkout is built into a wheel with the locked setuptools (--no-build-isolation) and installed --no-deps; pip check fails closed if a future framework ref declares a dependency the lock does not satisfy.
  • The adhoc-packages zizmor exception matched nothing in this repo and is removed.
  • publish.yml permissions: workflow default contents: read; contents: write only on the publish job, which commits and pushes the regenerated tree.

Write permissions kept (and why)

  • publish job contents: write: it pushes the regenerated tree with the built-in token.
  • security.yml zizmor job security-events: write: uploads the SARIF to code scanning.
  • close-prs.yml pull-requests: write: comments on and closes fork PRs (unchanged).

Measured

Scorecard v5.2.1 --local --show-details aggregate 5.6 → 7.2:

Check before after
Pinned-Dependencies 6 10
Token-Permissions 0 10
Vulnerabilities 10 10
  • zizmor 1.31.1 --offline with the repo config: no findings before and after, now with one fewer exception. Online audits locally: unmeasured (no token). The Security checks workflow (zizmor online + SARIF upload) is green on main.
  • actionlint 1.7.7: clean.
  • pip-audit on framework.txt: no known vulnerabilities.
  • Locally (Python 3.12): the new install sequence installs chock 0.15.2 at the catalog's .framework-ref, pip check clean, chock check passes on catalog main.
  • CodeQL: unmeasured; this repo has no codeql.yml.

Known red check

Generated-only is already red on main at "Regenerate from the catalog and diff": chock-catalog main has moved past the published tree, so it needs a publish run (owner). This PR does not change that step.


Generated by Claude Code

…SEC-5)

- The framework's dependencies install from .github/requirements/framework.txt
  (pip-compile --generate-hashes, Python 3.12) with --require-hashes; the framework
  checkout is built into a wheel with the locked build backend and installed with
  --no-deps, and `pip check` fails closed if the framework ref needs something the
  lock does not satisfy.
- The zizmor adhoc-packages exception matched nothing and is removed.
- publish.yml: workflow default is contents: read; contents: write moves to the one
  job that commits and pushes the regenerated tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>

Copy link
Copy Markdown
Collaborator Author

Generated-only / verify is red at Regenerate from the catalog and diff. That is not this PR's failure: Generated-only is also red on main (run 38492241354, head 307745e), because chock-catalog main has moved past the tree published here. The fix is the owner's: run publish.yml with dry_run: false. No code fix exists for this PR to carry.

The step this PR changes passes in CI: "Install the framework from source" (hash-pinned lock, then wheel --no-deps, then pip check) succeeded. A re-run would not help, because the failure is deterministic catalog drift.


Generated by Claude Code

@jothimani-rajendran
jothimani-rajendran marked this pull request as ready for review October 16, 2026 23:37
@jothimani-rajendran
jothimani-rajendran merged commit 5d8db6b into main Oct 17, 2026
4 of 5 checks passed
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