Add the workflow file
Create Why each permission is present:
.github/workflows/charter.yaml:The
security-events: write permission is required to upload SARIF to GitHub Code Scanning. Without it, findings won’t appear in the GitHub Security tab, but the threshold gate still works.| Permission | Why it’s needed |
|---|---|
contents: read | Lets the workflow read the repository |
security-events: write | Required for SARIF upload to Code Scanning |
actions: read | May be required for SARIF upload in private repos |
Configure the threshold
Set the minimum passing score in the workflow or in Threshold precedence (highest to lowest):
charter.yaml. Common values:- Standard (80)
- Strict (90)
- Defer to charter.yaml
The default for most repos. Enforces the baseline agent-readiness rules without requiring a fully optimized repo.
thresholdworkflow inputpolicy.thresholdincharter.yamlpolicy.profiledefault incharter.yaml- Built-in default: 80
View results in the GitHub Security tab
After the workflow runs, Charter findings appear in the GitHub Security tab as code scanning alerts:
Each finding includes:

- the rule ID and severity
- the file and line where Charter detected the issue
- a link to the rule documentation
Understand exit behavior
Charter preserves its CLI exit semantics through the action:
If you want annotations without blocking merges, set
| Exit code | Meaning | Job result |
|---|---|---|
0 | Score meets or exceeds threshold | Job passes |
1 | Score below threshold | Job fails (with fail-below: true) |
2 | Scan or setup error | Job fails |
fail-below: false:Troubleshooting
The Security tab shows no findings after the workflow ran
The Security tab shows no findings after the workflow ran
Confirm
security-events: write is present in the workflow permissions block. Also check that the workflow log shows a successful SARIF upload step — look for the upload-sarif action output.The PR passes even though the score is below the threshold
The PR passes even though the score is below the threshold
Check that
fail-below is not set to "false". Then confirm the effective threshold by looking at Charter’s output in the workflow log — the threshold in use is printed at scan start.The action fails before the scan runs
The action fails before the scan runs
Check that the
use-charter/charter-action@v1 ref is published and reachable. On self-hosted runners, confirm bash, gh, curl, tar, and sha256sum are available in the shell environment.