ci: add compliance gate job for org ruleset#38
Conversation
Adds a standalone 'compliance' gate job so the check context matches the org-level required status check name. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
|
| runs-on: ubuntu-latest | ||
| needs: [check] | ||
| steps: | ||
| - run: echo "Compliance gate passed" |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 days ago
To fix the problem, explicitly declare a permissions: block that applies least-privilege settings to the workflow. Since neither job in this snippet needs to write to the repository and the compliance job appears to not use the token at all, we can set permissions: contents: read at the workflow root as a minimal, safe default. This documents the intended permissions and prevents escalation if repo/org defaults are broader. If the reusable workflow reusable-compliance-check.yml needs more granular permissions, they should be declared there; here we only constrain this workflow.
The best single change with no functional impact is to add a root-level permissions: block after the name: (or after on:) in .github/workflows/compliance-check.yml, setting contents: read. This applies to all jobs that do not override permissions, including both check and compliance. No imports or additional methods are needed; this is purely a YAML configuration change inside the workflow file.
Concretely, in .github/workflows/compliance-check.yml, insert:
permissions:
contents: readafter line 2 (or any valid root position before jobs:). No other changes are required.
| @@ -5,6 +5,9 @@ | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| check: | ||
| uses: CHITTYOS/chittyops/.github/workflows/reusable-compliance-check.yml@main |
Summary
compliancegate job so check context matches org-level required status checkcompliance / compliancevscompliancecontext mismatch that blocks PR mergesTest plan
compliancecheck appears as a standalone status check🤖 Generated with Claude Code