Skip to content

chore(security): ignore test fixtures and stories in secret scanning - #3814

Merged
kojiwakayama merged 3 commits into
mainfrom
chore/secret-scanning-path-ignores
Aug 17, 2026
Merged

chore(security): ignore test fixtures and stories in secret scanning#3814
kojiwakayama merged 3 commits into
mainfrom
chore/secret-scanning-path-ignores

Conversation

@kojiwakayama

@kojiwakayama kojiwakayama commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • ignore only src/utils/logger/logger.test.ts and storybook/stories/ui/Input.stories.tsx, the two files with recurring detector-shaped false positives
  • keep secret scanning enabled for every other test and Storybook story
  • add a CI contract test that rejects broader or newly added exclusions unless the allowlist is deliberately updated

RED / GREEN

RED: the new config contract reported the repository-wide **/*.test.ts and Storybook directory globs instead of the two expected fixture files.

GREEN: the exact allowlist passes, and the test is included in deno task test:scripts.

Verification

  • deno test --config=scripts/test.deno.json --no-check --allow-read scripts/security/secret-scanning-config.test.ts
  • deno task typecheck
  • deno task lint:ci
  • deno fmt --check .github/secret_scanning.yml deno.json scripts/security/secret-scanning-config.test.ts
  • git diff --check

@github-actions

Copy link
Copy Markdown

📦 Client bundle boundary

Entrypoint Modules Source size Server leaks
src/index.client.ts 325 1937 KiB ✅ 0

A server module in a client graph aborts hydration in the browser. New leaks fail CI; known leaks are tracked in scripts/lint/client-bundle-baseline.json to burn down.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@kojiwakayama, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

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

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d1d62082-584e-4070-8be2-51ef1d35fb71

📥 Commits

Reviewing files that changed from the base of the PR and between 178f9e2 and f68a3ce.

📒 Files selected for processing (3)
  • .github/secret_scanning.yml
  • deno.json
  • scripts/security/secret-scanning-config.test.ts

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.

@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: 71c43a0a91

ℹ️ 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".

Comment thread .github/secret_scanning.yml Outdated
Alerts #1-#14 were all fake credentials in redaction/sanitization test
fixtures or Storybook display values, and editing those tests re-raises
new alerts for the same fixtures at new line numbers. Path-ignore them so
secret scanning stays signal.
@kojiwakayama
kojiwakayama force-pushed the chore/secret-scanning-path-ignores branch from 71c43a0 to ac81708 Compare August 17, 2026 08:57
@kojiwakayama

Copy link
Copy Markdown
Contributor Author

Exact-head review requested for ac81708f38f96cee8117a2a4f2519c7a5b6c19f6. The P1 broad-exclusion concern is fixed with an exact two-file allowlist and a CI contract test.

@codex review
@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

commit='ac81708f38f96cee8117a2a4f2519c7a5b6c19f6'

git rev-parse --verify "${commit}^{commit}"
git show --no-ext-diff --format=fuller --stat "$commit"
printf '\n--- changed files ---\n'
git diff-tree --no-commit-id --name-status -r "$commit"

printf '\n--- outlines ---\n'
for file in .github/secret_scanning.yml deno.json scripts/security/secret-scanning-config.test.ts; do
  if [ -f "$file" ]; then
    printf '\n### %s\n' "$file"
    ast-grep outline "$file" --items all 2>/dev/null || cat -n "$file"
  fi
done

printf '\n--- exact diff ---\n'
git show --no-ext-diff --format= "$commit" -- \
  .github/secret_scanning.yml \
  deno.json \
  scripts/security/secret-scanning-config.test.ts

Length of output: 9180


🏁 Script executed:

#!/bin/bash
set -euo pipefail

commit='ac81708f38f96cee8117a2a4f2519c7a5b6c19f6'

printf '%s\n' '--- fixture file metadata ---'
for file in src/utils/logger/logger.test.ts storybook/stories/ui/Input.stories.tsx; do
  if [ -f "$file" ]; then
    printf '\n### %s\n' "$file"
    wc -l "$file"
    ast-grep outline "$file" --items all 2>/dev/null || true
  else
    printf 'MISSING: %s\n' "$file"
  fi
done

printf '%s\n' '--- detector-shaped fixture contexts ---'
rg -n -i -C 3 \
  '(secret|token|api[_-]?key|password|credential|authorization|bearer|postgres(?:ql)?://|vf_(?:live|test)_)' \
  src/utils/logger/logger.test.ts storybook/stories/ui/Input.stories.tsx || true

printf '%s\n' '--- secret-scanning configuration references ---'
rg -n -i -C 3 \
  '(secret_scanning\.yml|paths-ignore|secret[ _-]?scann)' \
  .github deno.json scripts README.md 2>/dev/null || true

printf '%s\n' '--- changed-file whitespace validation ---'
git diff --check "${commit}^" "$commit"

printf '%s\n' '--- exact parent diff names and status ---'
git diff --name-status "${commit}^" "$commit"

Length of output: 25644


@kojiwakayama Exact-head review completed for ac81708f38f96cee8117a2a4f2519c7a5b6c19f6.

I found no actionable issues.

The allowlist contains only the two specified files. The contract test enforces the exact list. deno task test:scripts includes the contract test. git diff --check passed.

I did not execute the Deno verification commands in this review environment.

⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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: ac81708f38

ℹ️ 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".

Comment thread deno.json
@kojiwakayama

Copy link
Copy Markdown
Contributor Author

Exact-head follow-up f68a3cefa addresses the required-CI review finding.

  • lint:secret-scanning-config runs the exact allowlist contract.
  • Required lint:ci invokes that task.
  • Targeted contract, full lint:ci, formatting, and diff checks pass locally.
  • Both review threads are resolved.

@codex review
@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

commit='f68a3cefa'

printf '%s\n' '--- resolve exact commit ---'
git rev-parse --verify "${commit}^{commit}"
full_commit="$(git rev-parse "${commit}^{commit}")"
parent_commit="$(git rev-parse "${full_commit}^")"
printf 'commit=%s\nparent=%s\n' "$full_commit" "$parent_commit"

printf '%s\n' '--- changed files ---'
git diff-tree --no-commit-id --name-status -r "$full_commit"

printf '%s\n' '--- exact diff ---'
git diff --no-ext-diff "$parent_commit" "$full_commit" -- \
  deno.json \
  .github \
  scripts/security/secret-scanning-config.test.ts

printf '%s\n' '--- task definitions and CI references ---'
rg -n -C 4 \
  '"lint:secret-scanning-config"|"lint:ci"|secret-scanning-config\.test\.ts|deno task lint:ci|deno task lint:secret-scanning-config' \
  deno.json .github scripts/security 2>/dev/null || true

printf '%s\n' '--- relevant file contents ---'
for file in deno.json scripts/security/secret-scanning-config.test.ts; do
  if [ -f "$file" ]; then
    printf '\n### %s\n' "$file"
    cat -n "$file"
  fi
done

printf '%s\n' '--- whitespace validation ---'
git diff --check "$parent_commit" "$full_commit"

Length of output: 71744


@kojiwakayama Exact-head review completed for f68a3cefae9984605bb99e670a43cd74e23f80ef.

I found no actionable issues.

lint:secret-scanning-config runs the exact allowlist contract. lint:ci invokes that task. The lint CI workflow runs deno task lint:ci. git diff --check passed.

I did not execute Deno commands in this review environment.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

You are interacting with an AI system.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: f68a3cefae

ℹ️ 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".

@kojiwakayama
kojiwakayama added this pull request to the merge queue Aug 17, 2026
@kwakayama
kwakayama removed this pull request from the merge queue due to a manual request Aug 17, 2026
@kwakayama kwakayama added the needs-human-input Maintainer action required label Aug 17, 2026
@kojiwakayama
kojiwakayama added this pull request to the merge queue Aug 17, 2026
Merged via the queue into main with commit d84a7d4 Aug 17, 2026
36 checks passed
@kojiwakayama
kojiwakayama deleted the chore/secret-scanning-path-ignores branch August 17, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-human-input Maintainer action required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants