Skip to content

chore(governance): add CI/CD governance baseline#10

Open
chitcommit wants to merge 1 commit intomainfrom
automation/governance-baseline
Open

chore(governance): add CI/CD governance baseline#10
chitcommit wants to merge 1 commit intomainfrom
automation/governance-baseline

Conversation

@chitcommit
Copy link
Contributor

@chitcommit chitcommit commented Mar 2, 2026

Automated governance baseline remediation from org control loop.

Summary by CodeRabbit

Release Notes

  • New Features

    • Implemented automated code review orchestration with adversarial security focus
    • Added secret rotation audit workflow with 1Password integration for credential management compliance
    • Introduced governance gates to enforce policy checks on pull requests and commits
  • Chores

    • Added security configuration files for secret allowlisting and catalog management
    • Configured secret scanning allowlist for test and example files

@coderabbitai
Copy link

coderabbitai bot commented Mar 2, 2026

📝 Walkthrough

Walkthrough

This PR introduces GitHub Actions workflows and configuration files for secrets management, governance enforcement, adversarial review, identity onboarding validation, 1Password secret rotation audits, and credential scanning controls. Includes seven new files totaling 178 lines of configuration and workflow definitions without behavioral code changes.

Changes

Cohort / File(s) Summary
Secrets Management Configuration
.github/allowed-workflow-secrets.txt, .github/secret-catalog.json
Defines allowlist of seven permitted workflow secrets and catalog of four secrets with 1Password vault references (ChittyOS), rotation periods (30 days), and platform-security ownership.
GitHub Actions Workflows
.github/workflows/adversarial-review.yml, .github/workflows/governance-gates.yml, .github/workflows/identity-context-onboarding.yml, .github/workflows/onepassword-rotation-audit.yml
Introduces four workflows: adversarial review orchestration requesting CodeRabbit reviews; governance gates reusing reusable workflow; identity/context onboarding checks via Bash script; and 1Password rotation audit with secret validation, CLI execution, artifact upload, and conditional issue creation on audit failure.
Gitleaks Configuration
.gitleaks.toml
Adds allowlist configuration for gitleaks credential scanning, specifying six file path patterns to ignore non-production credential-like strings in test/example files.

Possibly related issues

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Secrets tucked in 1Password's nest,
Workflows guard what's best,
Governance gates stand tall and true,
Rotation audits keep things new,
Infrastructure hops along, ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the primary change: establishing CI/CD governance infrastructure with multiple workflow files, secret configuration, and gitleaks allowlist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch automation/governance-baseline

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

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

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: 08b2148e7a

ℹ️ 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".

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
.github/workflows/adversarial-review.yml (1)

5-46: Reduce repeated bot comments on synchronize events.

Current trigger + unconditional comment step will post repeatedly on every PR update. Consider gating comment creation to opened/reopened/ready_for_review (or dedupe existing bot comment).

Proposed patch
       - name: Trigger Bot Review Comments
+        if: ${{ github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'ready_for_review' }}
         uses: actions/github-script@v7
         with:
           script: |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/adversarial-review.yml around lines 5 - 46, The workflow
unconditionally posts a bot comment on every synchronize event; update the
"Trigger Bot Review Comments" step to first check context.payload.action (or
call github.rest.issues.listComments to dedupe) and only call
github.rest.issues.createComment when action is one of opened, reopened, or
ready_for_review (or when no existing bot comment from the same actor/body
exists); locate the "Trigger Bot Review Comments" step and adjust the inline
script to perform the action check or existing-comment lookup before creating
the comment, using the existing variables (context.payload.pull_request.number,
owner, repo) and the same comment body if the gate passes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/secret-catalog.json:
- Around line 3-28: The secret OP_SERVICE_ACCOUNT_TOKEN used by the workflow
onepassword-rotation-audit.yml (referenced on Line 17) is missing from the
secret catalog; add an entry to .github/secret-catalog.json with "name":
"OP_SERVICE_ACCOUNT_TOKEN", an appropriate "op_ref" pointing to the OnePassword
item for the service account, a "rotation_days" value consistent with other
tokens (e.g., 30), and "owner": "platform-security" so the token is governed and
automatically audited/rotated.

In @.github/workflows/governance-gates.yml:
- Line 10: The workflow at governance-gates.yml references a non-existent
reusable workflow via "uses: ./.github/workflows/reusable-governance-gates.yml";
fix by either adding a reusable workflow file named
reusable-governance-gates.yml under .github/workflows that exposes the expected
inputs/outputs, or update the "uses" line to point to an existing reusable
workflow in the repo (or a remote action) so the "uses" reference resolves
correctly and actionlint passes.

In @.github/workflows/onepassword-rotation-audit.yml:
- Around line 50-51: The workflow sets body="$(cat
reports/secret-rotation/latest.md)" which will fail the job if latest.md is
missing and prevent creating the GitHub issue; update the
onepassword-rotation-audit workflow to safely read the report by checking for
the file or using a fallback (e.g., if [ -f reports/secret-rotation/latest.md ]
then body="$(cat ...)" else body="Report missing: audit failed before report
generation" fi) before computing existing, so the body variable always contains
a string and the subsequent issue creation logic (the existing variable
computation and gh issue create/close steps) still runs reliably.
- Around line 19-40: Replace the mutable version tags with full 40-character
commit SHAs for the referenced actions: change actions/checkout@v4,
1password/install-cli-action@v1, and actions/upload-artifact@v4 to their
corresponding pinned SHAs; update the workflow step entries for the
actions/checkout, 1password/install-cli-action, and actions/upload-artifact uses
to the exact commit SHAs (found from each action's GitHub repository) so the
.github/workflows/onepassword-rotation-audit.yml steps are immutably pinned.

---

Nitpick comments:
In @.github/workflows/adversarial-review.yml:
- Around line 5-46: The workflow unconditionally posts a bot comment on every
synchronize event; update the "Trigger Bot Review Comments" step to first check
context.payload.action (or call github.rest.issues.listComments to dedupe) and
only call github.rest.issues.createComment when action is one of opened,
reopened, or ready_for_review (or when no existing bot comment from the same
actor/body exists); locate the "Trigger Bot Review Comments" step and adjust the
inline script to perform the action check or existing-comment lookup before
creating the comment, using the existing variables
(context.payload.pull_request.number, owner, repo) and the same comment body if
the gate passes.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aa7418a and 08b2148.

📒 Files selected for processing (7)
  • .github/allowed-workflow-secrets.txt
  • .github/secret-catalog.json
  • .github/workflows/adversarial-review.yml
  • .github/workflows/governance-gates.yml
  • .github/workflows/identity-context-onboarding.yml
  • .github/workflows/onepassword-rotation-audit.yml
  • .gitleaks.toml

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