-
Notifications
You must be signed in to change notification settings - Fork 0
chore(governance): add CI/CD governance baseline #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
chitcommit
wants to merge
1
commit into
main
Choose a base branch
from
automation/governance-baseline
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| CHITTYCONNECT_API_KEY | ||
| GITHUB_TOKEN | ||
| ORG_AUTOMATION_TOKEN | ||
| CHITTY_GATEWAY_TOKEN | ||
| CHITTY_AGENT_TOKEN | ||
| OP_SERVICE_ACCOUNT_TOKEN | ||
| CHITTYCONNECT_BROKER_TOKEN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "vault": "ChittyOS", | ||
| "secrets": [ | ||
| { | ||
| "name": "ORG_AUTOMATION_TOKEN", | ||
| "op_ref": "op://ChittyOS/GitHub Automation Token/token", | ||
| "rotation_days": 30, | ||
| "owner": "platform-security" | ||
| }, | ||
| { | ||
| "name": "CHITTYCONNECT_BROKER_TOKEN", | ||
| "op_ref": "op://ChittyOS/ChittyConnect Broker Token/token", | ||
| "rotation_days": 30, | ||
| "owner": "platform-security" | ||
| }, | ||
| { | ||
| "name": "CHITTY_GATEWAY_TOKEN", | ||
| "op_ref": "op://ChittyOS/ChittyGateway API Token/token", | ||
| "rotation_days": 30, | ||
| "owner": "platform-security" | ||
| }, | ||
| { | ||
| "name": "CHITTY_AGENT_TOKEN", | ||
| "op_ref": "op://ChittyOS/ChittyAgent Orchestrator Token/token", | ||
| "rotation_days": 30, | ||
| "owner": "platform-security" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: Adversarial Review Orchestrator | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: [opened, reopened, synchronize, ready_for_review] | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| issues: write | ||
|
|
||
| jobs: | ||
| orchestrate: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Request Reviewer Agents | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const reviewers = ["coderabbitai"]; | ||
| try { | ||
| await github.rest.pulls.requestReviewers({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| pull_number: context.payload.pull_request.number, | ||
| reviewers | ||
| }); | ||
| core.info(`Requested reviewers: ${reviewers.join(", ")}`); | ||
| } catch (error) { | ||
| core.warning(`Reviewer request failed: ${error.message}`); | ||
| } | ||
| - name: Trigger Bot Review Comments | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const lines = [ | ||
| "@coderabbitai review", | ||
| "@copilot review", | ||
| "Adversarial review request: evaluate security, policy bypass paths, and regression risk." | ||
| ]; | ||
| await github.rest.issues.createComment({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.payload.pull_request.number, | ||
| body: lines.join("\n") | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| name: Governance Gates | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [ main ] | ||
|
|
||
| jobs: | ||
| gates: | ||
| uses: ./.github/workflows/reusable-governance-gates.yml | ||
| secrets: inherit | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| name: Identity & Context Onboarding Gate | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [ main ] | ||
|
|
||
| jobs: | ||
| identity-onboarding: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Validate ChittyID Context Onboarding | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| bash scripts/check-chitty-onboarding.sh .chittyconnect.yml | ||
chitcommit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| name: 1Password Rotation Audit | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: "25 3 * * *" | ||
|
|
||
| permissions: | ||
| contents: read | ||
| issues: write | ||
|
|
||
| jobs: | ||
| audit: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| GH_TOKEN: ${{ secrets.ORG_AUTOMATION_TOKEN }} | ||
| OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Validate required secrets | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| [[ -n "${GH_TOKEN:-}" ]] || { echo "Missing ORG_AUTOMATION_TOKEN"; exit 1; } | ||
| [[ -n "${OP_SERVICE_ACCOUNT_TOKEN:-}" ]] || { echo "Missing OP_SERVICE_ACCOUNT_TOKEN"; exit 1; } | ||
| - name: Install 1Password CLI | ||
| uses: 1password/install-cli-action@v1 | ||
| - name: Run rotation audit | ||
| id: rotation | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| mkdir -p reports/secret-rotation | ||
| if bash scripts/onepassword-rotation-audit.sh .github/secret-catalog.json reports/secret-rotation; then | ||
chitcommit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| echo "status=pass" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "status=fail" >> "$GITHUB_OUTPUT" | ||
| fi | ||
| - name: Upload rotation report | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: onepassword-rotation-report | ||
| path: reports/secret-rotation | ||
| - name: Open or update rotation issue on failure | ||
| if: ${{ steps.rotation.outputs.status == 'fail' }} | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| title="[Security] 1Password rotation policy violations" | ||
| body="$(cat reports/secret-rotation/latest.md)" | ||
| existing="$(gh issue list --state open --search "\"${title}\" in:title" --json number,title --jq '.[] | select(.title=="'"${title}"'") | .number' | head -n1 || true)" | ||
| if [[ -n "${existing}" ]]; then | ||
| gh issue comment "${existing}" --body "${body}" >/dev/null | ||
| else | ||
| gh issue create --title "${title}" --body "${body}" >/dev/null | ||
| fi | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| title = "chittycommand-gitleaks-config" | ||
|
|
||
| [allowlist] | ||
| description = "Known test/example files with non-production credential-like strings" | ||
| paths = [ | ||
| '''_ext/chittyid/chittycontext\.config\.js''', | ||
| '''_ext/chittyid/monitoring/scripts/setup-monitoring\.sh''', | ||
| '''_ext/chittyid/test-security\.sh''', | ||
| '''_ext/chittyid/tests/integration/chittyrouter-gateway\.test\.js''', | ||
| '''_ext/chittyid/tests/penetration/bypass-attempts\.test\.js''', | ||
| '''_ext/chittyops/project-awareness/test/qa-integration-tests\.js''', | ||
| ] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.