Skip to content

policy: allowlist scanner-safe-bundle example reference outputs#564

Merged
EffortlessSteven merged 1 commit into
mainfrom
policy/scanner-safe-bundle-reference-allowlist
May 11, 2026
Merged

policy: allowlist scanner-safe-bundle example reference outputs#564
EffortlessSteven merged 1 commit into
mainfrom
policy/scanner-safe-bundle-reference-allowlist

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

cargo xtask check-file-policy was failing with 5 unmatched files, all under examples/scanner-safe-bundle/expected/:

  • `examples/scanner-safe-bundle/expected/kv-v2.shape.json`
  • `examples/scanner-safe-bundle/expected/manifest.json`
  • `examples/scanner-safe-bundle/expected/receipts/audit-surface.json`
  • `examples/scanner-safe-bundle/expected/receipts/materialization.json`
  • `examples/scanner-safe-bundle/expected/secret.shape.yaml`

These are reference outputs (manifest, payload shapes, receipts) that the `examples/scanner-safe-bundle/README.md` walkthrough uses to demonstrate the deterministic generator. Per the scanner-safe lesson, all values are shape-only — never real secret material — so committing them is correct, they just needed an explicit allowlist entry.

Add one entry covering `examples/scanner-safe-bundle/expected/**/*` with:

  • `kind = "scanner_safe_bundle_reference"`
  • `owner = "cli"`
  • `surface = "examples"`
  • `classification = "test"`
  • `covered_by = ["examples/scanner-safe-bundle/README.md", "manual review"]`

Validation

  • `cargo xtask check-file-policy` — 1214 files; 1214 matched; 0 unmatched; 0 unused; 0 expired (was 5 unmatched before)
  • `git diff --check` — clean

Test plan

  • CI green

`cargo xtask check-file-policy` flagged 5 unmatched files under
`examples/scanner-safe-bundle/expected/` — the manifest, payload shapes,
and receipts that the example README walks through. Add a single entry
covering the whole `expected/**/*` tree, classified as `test` with
covered_by pointing at the example README and manual review.

Verified: 1214/1214 matched, 0 unmatched.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@EffortlessSteven has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 1 second before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3cd32559-1450-4563-80b9-a5f7637beb31

📥 Commits

Reviewing files that changed from the base of the PR and between 310a70f and f65b421.

📒 Files selected for processing (1)
  • policy/non-rust-allowlist.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch policy/scanner-safe-bundle-reference-allowlist

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request adds an allowlist entry for example reference outputs in policy/non-rust-allowlist.toml. Feedback suggests narrowing the file glob from a catch-all to specific extensions like .json and .yaml to adhere to the principle of least privilege and prevent the accidental inclusion of sensitive material. Additionally, it is recommended to remove documentation files from the covered_by field as they do not serve as verification mechanisms.

Comment on lines +237 to +244
[[allow]]
glob = "examples/scanner-safe-bundle/expected/**/*"
kind = "scanner_safe_bundle_reference"
owner = "cli"
surface = "examples"
classification = "test"
reason = "Scanner-safe bundle reference outputs (manifest, payload shapes, receipts) used by examples/scanner-safe-bundle/README.md to demonstrate deterministic generator stability. Shape-only — never real secret material."
covered_by = ["examples/scanner-safe-bundle/README.md", "manual review"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To maintain the 'least privilege' principle of the file policy and ensure consistency with other entries (e.g., lines 158-182), it is better to narrow the glob to specific extensions (.json, .yaml) rather than using a catch-all **/*. This prevents the accidental inclusion of sensitive files like private keys or certificates in the allowlist.

Additionally, the covered_by field should list verification mechanisms (like automated tests or manual review processes). Since the README is documentation rather than a verifier, it should be removed from covered_by (it is already mentioned in the reason).

Suggested change
[[allow]]
glob = "examples/scanner-safe-bundle/expected/**/*"
kind = "scanner_safe_bundle_reference"
owner = "cli"
surface = "examples"
classification = "test"
reason = "Scanner-safe bundle reference outputs (manifest, payload shapes, receipts) used by examples/scanner-safe-bundle/README.md to demonstrate deterministic generator stability. Shape-only — never real secret material."
covered_by = ["examples/scanner-safe-bundle/README.md", "manual review"]
[[allow]]
glob = "examples/scanner-safe-bundle/expected/**/*.json"
kind = "scanner_safe_bundle_reference"
owner = "cli"
surface = "examples"
classification = "test"
reason = "Scanner-safe bundle reference outputs (manifest, receipts) used by examples/scanner-safe-bundle/README.md to demonstrate deterministic generator stability. Shape-only — never real secret material."
covered_by = ["manual review"]
[[allow]]
glob = "examples/scanner-safe-bundle/expected/**/*.yaml"
kind = "scanner_safe_bundle_reference"
owner = "cli"
surface = "examples"
classification = "test"
reason = "Scanner-safe bundle reference outputs (payload shapes) used by examples/scanner-safe-bundle/README.md to demonstrate deterministic generator stability. Shape-only — never real secret material."
covered_by = ["manual review"]
References
  1. The project's primary goal is to prevent the commitment of sensitive material to version control. Narrowing allowlist globs to specific extensions instead of using a catch-all helps enforce this by preventing accidental inclusion of raw key material. (link)

@EffortlessSteven EffortlessSteven merged commit 1d7ee38 into main May 11, 2026
5 checks passed
@EffortlessSteven EffortlessSteven deleted the policy/scanner-safe-bundle-reference-allowlist branch May 11, 2026 10:49
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.

1 participant