ci: gitleaks allowlist for placeholder tokens in demo docs #147
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/OpenSpec
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
RFC - Request For Comments
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
hermes-attempted
hermes-needs-clarification
hermes-ready
hermes-review
hermes-wip
human-required
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
agentic-forges/forgejo-mcp!147
Loading…
Reference in a new issue
No description provided.
Delete branch "refs/pull/147/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
pre-commit run gitleaks/ Tektoncode-scansflag the lineAuthorization: token invalid_tokenin the forthcomingdemos/multi-tenant-http.md(fork branch
byteflavour/stateless-token). The token is intentional test data — request 4 in the demo illustrates what an invalid token does.Add a tightly-scoped per-rule allowlist on
curl-auth-headerso the placeholder-shaped strings get skipped only indemos/*.md, leaving every other secret-detection signal intact.Allowlist scope
curl-auth-header(the default rule that fired)demos/.*\.md$^invalid[-_]?token$^placeholder[-_]?token$^changeme$^your[-_](api[-_])?token[-_]here$Real tokens are not bypassed — verified locally by appending
Authorization: token ghp_abcdef…ABCDto the same demo file: thegithub-patrule still flagged it.
Local verification
Gotcha worth knowing
gitleaks v8.30.x ignores user-added
[[rules]]blocks that appear after any top-level[[allowlists]]block in the same TOML file. Per-rule allowlists must come first. Discovered while iterating on this PR; documented in the inline comment near the new block so the next maintainer doesn't waste time.Related: gitleaks v8.30.x also does not propagate top-level
[[allowlists]](plural) to default rules — only the deprecated[allowlist](singular) does, and that one can't coexist with[[allowlists]]. Per-rule is the only working path here.Test plan
code-scansPipelineRun on this PR passes (no leaks)byteflavour/stateless-token) passes after this merges to mainpre-commit run gitleaks --all-filesclean post-mergeRefs forgejo-mcp-dhd. Unblocks the multi-tenant-http demo PR.
op1st Pipelines as Code/code-scans-z2f8m is running.
Starting Pipelinerun code-scans-z2f8m in namespace op1st-pipelines
You can monitor the execution using the op1st Pipelines as Code PipelineRun viewer or through the command line by
using the tkn CLI with the following command:
tkn pr logs -n op1st-pipelines code-scans-z2f8m -fop1st Pipelines as Code/on-pull-request-mk6q5 is running.
Starting Pipelinerun on-pull-request-mk6q5 in namespace op1st-pipelines
You can monitor the execution using the op1st Pipelines as Code PipelineRun viewer or through the command line by
using the tkn CLI with the following command:
tkn pr logs -n op1st-pipelines on-pull-request-mk6q5 -fop1st Pipelines as Code/code-scans-z2f8m has successfully validated your commit.
Task Statuses:
fetch-source
gitleaks-version
gitleaks
op1st Pipelines as Code/on-pull-request-mk6q5 has successfully validated your commit.
Task Statuses:
fetch-source
build-and-test