advisory-scan: read-only GitHub token from env or file (rate limit only)
Anonymous GitHub API is 60 req/hr — a full weekly sweep across ~20 recipes exhausts it and the scan then reports sources as failed (visible, but degraded coverage). A token lifts it to 5000/hr. _github_token(): GITHUB_TOKEN env wins, else GITHUB_TOKEN_FILE (default /srv/cc-ci/.github-token, 0600, gitignored). Reading PUBLIC advisories needs NO scopes — a classic PAT with nothing ticked, or fine-grained limited to 'Public repositories: read'. The tool only ever GETs advisories; do not grant write scopes. A missing token is not an error: the scan runs anonymously and surfaces failures. Also gitignores .github-token and .hcloud-token.
This commit is contained in:
@@ -28,3 +28,7 @@ master-age.txt
|
||||
# Python bytecode cache
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Local API tokens — never committed (advisory-scan / hetzner recovery)
|
||||
.github-token
|
||||
.hcloud-token
|
||||
|
||||
Reference in New Issue
Block a user