Skip to content

ci-health: report tracker credential failures once per scan - #999

Merged
hyperpolymath merged 3 commits into
mainfrom
fix/ci-evidence-classification
Nov 3, 2026
Merged

hyperpolymath merged 3 commits into
mainfrom
fix/ci-evidence-classification

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Regression work for estate workflow incident triage. Keep observed job-level failures separate from zero-job startup attribution.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T07:36:13.153993Z a8b7e56 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 51ebbffb-451d-42e6-a713-b9c99cd37118
Commits

Reviewing files that changed from the base of the PR and between a8b7e56 and a4f7222.

Files selected for processing: 2
  • scripts/ci-health/README.adoc
  • scripts/ci-health/sweep.sh
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f24938be-8dc3-460b-8f8d-17157dbfffe8
Commits

Reviewing files that changed from the base of the PR and between 204b4c3 and a8b7e56.

Files selected for processing: 1
  • scripts/ci-health/detect.sh

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details
Context from checks skipped due to timeout: 16
  • GitHub Check: governance / Validate Hypatia Baseline
  • GitHub Check: Integration Tests
  • GitHub Check: Cargo test
  • GitHub Check: Rust Tests
  • GitHub Check: Validate Documentation
  • GitHub Check: Build AsciiDoc
  • GitHub Check: CodeRabbit
  • GitHub Check: Escript packaging soundness
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: stress-test
  • GitHub Check: criterion + baseline gate
  • GitHub Check: E2E — Elixir Scanner Pipeline
  • GitHub Check: Rust Dependency Audit
  • GitHub Check: Container Security (Trivy) (deploy/Containerfile)
  • GitHub Check: Generate SBOM
  • GitHub Check: Build AsciiDoc
Additional context used
ast-grep (0.50.0)
scripts/ci-health/detect.sh

[warning] 50-50: A credential-bearing variable (e.g. PASSWORD, PASSWD, SECRET, TOKEN, API_KEY) is assigned a hardcoded string literal. Secrets committed to a script are exposed in source control, process listings, and shell history, and cannot be rotated without a code change. Read the value from a secrets manager or an injected environment variable at runtime instead (e.g. PASSWORD="${DB_PASSWORD:?must be set}"), and never commit the literal.
Context: tracker_token_seen=false
Note: [CWE-798] Use of Hard-coded Credentials.

(hardcoded-password-assignment-bash)

[warning] 60-60: A credential-bearing variable (e.g. PASSWORD, PASSWD, SECRET, TOKEN, API_KEY) is assigned a hardcoded string literal. Secrets committed to a script are exposed in source control, process listings, and shell history, and cannot be rotated without a code change. Read the value from a secrets manager or an injected environment variable at runtime instead (e.g. PASSWORD="${DB_PASSWORD:?must be set}"), and never commit the literal.
Context: tracker_token_seen=true
Note: [CWE-798] Use of Hard-coded Credentials.

(hardcoded-password-assignment-bash)

GitHub Check: SonarCloud Code Analysis
scripts/ci-health/detect.sh

[failure] 58-58: Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=hyperpolymath_hypatia&issues=AaGbLq6iALOZc6cdtgW-&open=AaGbLq6iALOZc6cdtgW-&pullRequest=999

Additional comments: 1
scripts/ci-health/detect.sh-58-58: 1

58-58: Minor · Maintainability & Code Quality · Quick win

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Use [[ for the tracker-token guard.

The guard starts with [ "$tracker_token_seen" = false ]. SonarCloud reports this line. Replace it with a [[ ... ]] comparison to satisfy the shell-analysis rule.

This follows the supplied SonarCloud diagnostic.

Source: Linters/SAST tools

Summary

Summary by CodeRabbit

  • New Features
    • CI health reports now flag repositories when failure annotations indicate a missing automation token. The alert is marked high severity and recommends comparing configuration pins in read-only mode before granting repository-scoped write access. The report is shown once per repository, even when multiple matching annotations are present.

The CI health scan now reports one HIGH-severity B-TRACKER-TOKEN finding per repository when annotations contain either recognised missing-AUTOMATION_TOKEN message. The finding recommends read-only pin comparison before repository-scoped write access.

Changes: Tracker-token finding

Layer / File(s) Summary
Detect missing tracker tokens
scripts/ci-health/detect.sh
The annotation scan emits a B-TRACKER-TOKEN finding for the first matching missing-credential message. It does not emit additional findings for later matches. The finding recommends comparing pins read-only before provisioning repository-scoped write access.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Possibly related issues

Possibly related PRs

  • hyperpolymath/hypatia#992 — Updates reusable-workflow pins and adds consistency checks for the stale-pin failure path referenced by this finding.
Merge Risk: Moderate · previous review a8b7e

The new tracker-token finding is detected, but its details and remediation guidance will not appear in the estate report or tracking issue. Add it to the report filter before merging, and document the class in the README.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title names the change: the failure-run scan in ci-health now reports tracker credential failures once per scan. The raw summary says the scan reports B-TRACKER-TOKEN once per repository when an a…
Description check Passed The description says the change is regression work for estate workflow incident triage and separates observed job-level failures from zero-job startup attribution. The changeset adds B-TRACKER-TOKEN r…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change: the failure-run scan in ci-health now reports tracker credential failures once per scan. The raw summary says the scan reports B-TRACKER-TOKEN once per repository when an annotation contains either missing-AUTOMATION_TOKEN message. The title is specific and matches the changeset. It says 'once per scan' while the summary says 'once per repository', a minor wording difference that does not make the title misleading.

Full details: Description check

Explanation

The description says the change is regression work for estate workflow incident triage and separates observed job-level failures from zero-job startup attribution. The changeset adds B-TRACKER-TOKEN reporting in a CI health detection script. The description relates to the changeset's purpose, though it does not name the tracker credential report. The check is lenient, so it passes.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches
Generate docstrings
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a8b7e569c1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

[ -n "${job_id:-}" ] || continue
msg=$(api "repos/$O/$R/check-runs/$job_id/annotations?per_page=100" --jq '.[].message // empty' || true)
if [ "$tracker_token_seen" = false ] && [[ "$msg" == *"Stale cicd-suite pins detected. AUTOMATION_TOKEN is required"* || "$msg" == *"AUTOMATION_TOKEN is not set. This job edits files under .github/workflows/"* ]]; then
emit B-TRACKER-TOKEN HIGH "Pin updater reports missing write credential (run $fail_id) → compare pins read-only before provisioning repository-scoped write access"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Include tracker-token findings in the sweep report

When this emits B-TRACKER-TOKEN, the scheduled entry point in scripts/ci-health/sweep.sh never includes it in the generated report: line 52 only selects B-(ALLOWLIST|LOCKFILE|STARTUPFAIL), while line 53 still sees the new B- row and suppresses the _none_ placeholder. Consequently, repositories with this credential failure disappear from both the workflow summary and rolling tracking issue, potentially leaving a blank B section; add the new class to the report filter.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty sure that's a placeholder

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fix comments: Fix CodeRabbit comments on this PR

Comment thread scripts/ci-health/detect.sh Resolved
Comment thread scripts/ci-health/detect.sh Resolved
@sonarqubecloud

sonarqubecloud Bot commented Nov 2, 2026

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

@hyperpolymath
hyperpolymath merged commit 7b63632 into main Nov 3, 2026
97 of 98 checks passed
@hyperpolymath
hyperpolymath deleted the fix/ci-evidence-classification branch November 3, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants