Skip to content

Preserve pinned source closure and resolve governance findings - #652

Merged
hyperpolymath merged 6 commits into
mainfrom
setup/governance-policy-lock-20261107
Nov 7, 2026
Merged

hyperpolymath merged 6 commits into
mainfrom
setup/governance-policy-lock-20261107

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

This change preserves source-attested reusable-workflow closure and resolves the nine governance findings without policy waivers.

Released gh-actions-lock v0.4.1 does not lock external job-level reusable workflows. A separate gate binds five active caller/job pairs to immutable repository/commit/path/blob identities, authenticates raw Git objects in an isolated bare cache, and compares observed direct edges with reviewed receipt unions. Fetched code is never executed. Missing evidence is nonzero NOT-RUN; contradictory identities and dropped edges are fatal. Two explicitly historical source paths preserve the original standards75bd union and cannot substitute for active callers.

All 20 original ordinary lock records, 10 supplemental records, 13 original receipt rows and six newer governance receipt rows are preserved. Supplemental records are admitted only after complete source verification. The published governance caller stays pinned to standards ea2f4d8a886585ed442687ae63d4ad7493379ba4. At the source-verification checkpoint, Fleet #651 and standards #1419 were separate drafts. Both subsequently merged through the concurrent owner operation described below. The source job remains an explicit E2E prerequisite with failure/skipped/cancelled/missing results rejected; no branch ruleset or baseline is changed.

The governance follow-up removes the four prohibited Python auditor/test files and replaces them with an isolated Rust CLI plus Bash entrypoints. It preserves map and regeneration exit semantics, strict input validation, transitive closure comparison, source-scope limitations and all original regression controls. The parser is saphyr 0.3.3; the abandoned unsafe-libyaml dependency is absent. CI audits the exact crate lock with cargo-audit 0.22.2, verifies the release archive SHA256, and denies warnings without advisory exclusions.

The four credential-bearing workflow jobs now run harden-runner at 46b06cea07f9e64621fdf066ba77ac6915163d43. Dispatch and SMTP jobs use explicit egress block rules; scheduled fleet scans use audit mode pending endpoint observations. Inbox write permissions are scoped to the existing auto-merge job, and its already-produced outputs are declared for downstream consumers. Existing triggers, guards, needs, steps and concurrency are preserved. No mail or dispatch was manually sent to test these rules.

Official lock regeneration rewrites bare SHA uses to known tags. The final lock therefore preserves the reviewed records verbatim and imports only the officially generated hardener metadata under its authoritative SHA key, plus four workflow edges. Both official read-only --verify-local and authenticated --verify pass. The tag v2.22.3 resolves to that SHA, although the upstream commit message says v2.23.0; the SHA is authoritative.

Local validation at signed head e911e68 (tree 8019b4d07da0c96f9072a677e67b9d093ea146a5):

  • 55 source controls, 47 preserved closure controls and nine migration-preflight controls pass.
  • Five source roots verified; integrated audit fatal=0, review=0, not-run=0, accepted=3, source-attested-records=11.
  • 41 native Rust tests pass. Independent verification replays all 22 original map controls, eight regeneration methods/eight scenarios, 30 additional adversarial cases and two subprocess-failure controls.
  • Actual pinned Hypatia RE001/WH002 rules report no findings; four-workflow actionlint passes.
  • All 20 reviewed dependency records and original workflow edges remain unchanged apart from the one added hardener record/four edges.
  • Dependency audit --deny warnings is clean at RustSec 309392b18f6b17022f82c701f300433126901068.

The final signed follow-up is a070e1e (reviewed tree 8eaf15863039c90b6a5d3fae91a8efdc405f3133). It passes 42 native Rust tests on Rust/Cargo 1.85.1, addresses Sonar’s control-flow, HTTPS-redirect and read-permission findings, and closes two independently reproduced parser fail-open batches. All 11 bare numeric/malformed-radix forms reject, and all 11 quoted counterparts remain accepted; the immutable regeneration controls pass again. Conservative additional rejections of ambiguous plain strings are documented rather than presented as exact acceptance parity. No dependency lock, source identity or receipt data changed in this follow-up. On this final head, all nine distinct required contexts pass. Hosted source closure records 55/47/9 passed controls with zero failures, and the integrated audit retains fatal=0, review=0, not-run=0, accepted=3 and source-attested-records=11. E2E, SonarCloud, governance baseline/language policy, action-lock verification, K9 and DEED pass. The report-back production job also completed successfully on that reviewed head; the Scorecard app alert below remains recorded. No all-CI-green claim is made.

Scorecard’s app check flags contents:write on the existing opt-in auto-merge job. That permission is scoped to the guarded job and required by its existing merge API and merge-result git push; GitHub’s merge endpoint documentation confirms the contents-write requirement. The default-off guard and merge criteria remain unchanged. The alert remains open for owner review; no suppression, broader PAT or feature deletion was substituted. The distinct Actions Scorecard PR job passes on the final head. CodeRabbit skipped automatic review during the coordinated draft phase; that skip is not counted as a completed review. The scanner migration preflight still requires canary evidence and exits 2 without it. The native en_GB.UTF-8 report-back ordering fixture issue was reproduced on unchanged base and prior candidate and remains separate. Static egress review does not establish successful SMTP or dispatch runtime behavior.

Scope and reproducible commands are documented in docs/migrations/pinned-source-closure.adoc and tools/workflow-lock-audit/README.adoc. This proves the stated direct-edge/receipt boundary, not arbitrary recursive runtime/container/downloaded-script provenance. No exemptions, credentials, rulesets, mirror activation or ordinal work are included. The coordinated work kept this PR draft through verification of a070e1e. A separate operation under the owner account marked it ready at 11:46:49 UTC, merged main into the branch as 9ad13bc, then merged this PR as c1d8754 at 11:47:21 UTC. The owner subsequently confirmed that merge was intentional and requested verification. The incoming main changes affect only four finishingbot analyzer files; the reviewed audit, workflow, lock and receipt files are unchanged. The combined tree is bd62426860a4696353850c8d7620719350b359d4, so earlier whole-tree results remain attributed to a070e1e.

Post-merge verification: E2E/source closure, Governance, Hypatia, CodeQL, Lock Sync and Dogfood pass. Rhodibot’s canon-drift guard correctly rejects the upstream capability table: standards fe57d352f0b1a50e5cb07b4aac2581caf355388e has table version 0.3.1/hash 5c510bba025be718deebb12d0333bfe7db2da43c66578b728b1a334df65290b1, but its canon.lock still pins 2f31f46d4753432e0aa8c9c28f339e18e062c98dc6e6ef4ecbb76993cf37638b. A Fleet-only repin would fail the next lock consistency check. The follow-up is a coordinated spine/canon release, then a reviewed Fleet repin; no drift gate was weakened. Five mirror jobs fail on destination/access or missing approved SSH fingerprints, without evidence of an audit-parser regression. No mirror activation, credential change, baseline waiver or rollback was performed.

The main-branch Sonar analysis also exposed an older shell:S6506 issue in the optional panic-rule upstream fetch. The one-line HTTPS/redirect correction merged separately in #653 as 46d26a4 after all nine required checks and CodeRabbit’s completed review passed. The main-branch Sonar gate now passes. The independent canon-release and mirror-configuration blockers remain.

Adopt published standards ea2f4d8 and supported gh-actions-lock scope. Only two setup paths; reader proposal excluded.
@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 8a4fedd and 9ad13bc.

Files ignored due to path filters: 3

  • .github/workflows/actions.lock is excluded by !**/*.lock
  • scripts/lib/lock-closure-receipts.tsv is excluded by !**/*.tsv
  • tools/workflow-lock-audit/Cargo.lock is excluded by !**/*.lock
Files selected for processing: 25

  • .github/workflows/e2e.yml
  • .github/workflows/governance.yml
  • .github/workflows/inbox-steward.yml
  • .github/workflows/instant-sync.yml
  • .github/workflows/push-email-notify.yml
  • .github/workflows/supervised-fleet-scan.yml
  • docs/migrations/pinned-source-closure.adoc
  • docs/migrations/secret-scanner-cicd-suite/preflight.sh
  • scripts/audit-lock-closure.sh
  • scripts/audit-lock-regeneration.py
  • scripts/audit-lock-regeneration.sh
  • scripts/audit-pinned-reusable-sources.sh
  • scripts/audit-workflow-lock-map.py
  • scripts/audit-workflow-lock-map.sh
  • scripts/lib/pinned-reusable-sources.json
  • scripts/tests/lock-closure-test.sh
  • scripts/tests/pinned-reusable-sources-test.sh
  • scripts/tests/pinned-source-entrypoints-test.sh
  • tests/lock-regeneration-test.py
  • tests/workflow-lock-map-test.py
  • tools/workflow-lock-audit/.gitignore
  • tools/workflow-lock-audit/Cargo.toml
  • tools/workflow-lock-audit/README.adoc
  • tools/workflow-lock-audit/src/main.rs
  • tools/workflow-lock-audit/tests/contracts.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@hyperpolymath hyperpolymath changed the title Refresh governance policy and migrate supported action locks Preserve pinned reusable closure with supported action locks Nov 7, 2026
auto-merge-prs:
name: Auto-merge qualifying PRs
permissions:
contents: write
@hyperpolymath hyperpolymath changed the title Preserve pinned reusable closure with supported action locks Preserve pinned source closure and resolve governance findings Nov 7, 2026
@hyperpolymath
hyperpolymath marked this pull request as ready for review November 7, 2026 11:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T11:55:04.580884Z a070e1e Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@hyperpolymath
hyperpolymath merged commit c1d8754 into main Nov 7, 2026
50 of 51 checks passed
@hyperpolymath
hyperpolymath deleted the setup/governance-policy-lock-20261107 branch November 7, 2026 11:47
@sonarqubecloud

sonarqubecloud Bot commented Nov 7, 2026

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a070e1e7b7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/e2e.yml
printf '%s %s\n' ab28a1bdb54db4d5d8ad5981cf1f959410370b3d28250dbd35f6a44248620e39 "$archive" | sha256sum -c -
tar -xzf "$archive" -C "$RUNNER_TEMP"
"$RUNNER_TEMP/cargo-audit-x86_64-unknown-linux-gnu-v0.22.2/cargo-audit" audit --file tools/workflow-lock-audit/Cargo.lock --deny warnings
- name: Test workflow lock-map and regeneration audit

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore PyYAML before running the E2E script

Replacing the PyYAML installation with this step removes a prerequisite that is still used later: tests/e2e.sh:170 executes import yaml for every workflow, and .github/workflows/labels.yml:12 explicitly documents that PyYAML is not preinstalled on GitHub runners. On a clean ubuntu-latest image without that module, every parse attempt is therefore counted as a failure and the E2E job fails; retain the installation or migrate that validation before removing it.

Useful? React with 👍 / 👎.

(.uses|type=="array") and all(.uses[]; (.kind=="step" or .kind=="job") and (.ref|type=="string" and length>0))) and
([.sources[]|[(.repository|ascii_downcase),.commit,.path]]|length)==([.sources[]|[(.repository|ascii_downcase),.commit,.path]]|unique|length) and
all(.dependencies|to_entries[];
(.key|test("^[A-Za-z0-9][A-Za-z0-9_.-]*/[A-Za-z0-9][A-Za-z0-9_.-]*@[^[:space:]@]+$")) and

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enforce the recorded SHA-256 source digest

The tracked sources all declare content_sha256, and this script even requires sha256sum, but the schema only validates the Git blob SHA-1 and the extracted bytes are never compared with content_sha256. Consequently the field can be omitted or replaced with arbitrary text while the verifier still reports the source as authenticated, so the SHA-256 evidence claimed in docs/migrations/pinned-source-closure.adoc is not actually enforced; require a 64-hex digest here and compare it with the extracted blob before accepting the source.

Useful? React with 👍 / 👎.

}
],
"source_url": "https://github.com/metadatastician/standards/blob/ea2f4d8a886585ed442687ae63d4ad7493379ba4/.github/workflows/governance-reusable.yml",
"local_file": "C:\\Users\\sudoodle\\OneDrive\\Documents\\ChatGPT\\TYPE THEORY\\echo-reader-compat-20261106\\closure-cycle-20261107\\sources\\metadatastician\\standards\\ea2f4d8a886585ed442687ae63d4ad7493379ba4\\.github\\workflows\\governance-reusable.yml"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove workstation paths from the tracked manifest

This field publishes a contributor's Windows username and private OneDrive directory structure in the repository, and the same absolute path metadata is repeated for every source. The verifier never consumes local_file, while docs/migrations/pinned-source-closure.adoc:167-171 explicitly says local absolute paths are not presented as downloadable artifacts; remove these collection-machine paths before publishing the manifest.

Useful? React with 👍 / 👎.

Comment on lines +153 to +154
if(match(line,/^[[:space:]]*(-[[:space:]]+)?["\047]?uses["\047]?[[:space:]]*:/)){
head=substr(line,1,RLENGTH);kind=(head~/-/||(steps&&ind>si))?"step":"job";raw=uncomment(substr(line,RLENGTH+1));sub(/^[[:space:]]+/,"",raw);sub(/[[:space:]]+$/,"",raw)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict uses detection to action and job keys

This pattern treats every indented key named uses as an action or reusable-workflow reference without checking its YAML parent. A valid action step or reusable-workflow job can have an input named uses under its with: mapping; in that case this reader invents an extra dependency, and the source audit returns SOURCE-PIN, SOURCE-LOCAL, or an edge mismatch even though the workflow is valid. Track the job/step and with indentation so only jobs.<id>.uses and jobs.<id>.steps[*].uses are emitted.

Useful? React with 👍 / 👎.

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.

2 participants