Skip to content

Release v1.2.0: secret scan allow paths, and links in replies - #13

Merged
RobHofmann merged 9 commits into
mainfrom
12-secret-scan-allow-paths
Nov 8, 2026
Merged

RobHofmann merged 9 commits into
mainfrom
12-secret-scan-allow-paths

Conversation

@RobHofmann

@RobHofmann RobHofmann commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Refs #12
Refs #14

What

  • secretScan.allowPaths in aisdlc.json holds regular expressions on file paths that hold secrets on purpose. GitleaksConfig.psm1 adds them as a second allowlist, next to the allowlist of the AI-SDLC. Without the field, the config is the same as before.
  • Invoke-Preflight.ps1, Test-GitleaksBaseline.ps1 and Create-GitleaksBaseline.ps1 pass the repository root, so all three skip the same paths.
  • Create-GitleaksBaseline.ps1 now scans with the generated config, so a new baseline also leaves out the sync manifest hashes.
  • The layout page lists the field, and docs/packages/core.md names it. Release v1.2.0: CHANGELOG, every apm.yml, the sync manifest and the lock file.
  • A reply, work item or page gives the full link to every pull request, issue or page that the reader must open or act on (Give the full link to every pull request, issue or page a reply points to #14). The rule is in language.md and in the ## Communication part of AGENTS.md. This was pull request Give the full link to every pull request, issue or page a reply points to #15, now closed and folded in here.

Checks

  • 3 new tests in GitleaksConfig.Tests.ps1, red before the change and green after, one with a real gitleaks run. The baseline test now expects the generated config, and checks that it is removed.
  • The tests of the gitleaks scripts, the config module and the pre-flight: 111 passed. One run of the existing sync manifest test failed once under load and passed three times in a row after; it does the same on main.
  • Repo gates pass locally, and the pre-push hook passed.
  • Tried on a real consumer: its baseline became much smaller.

…secret scan

secretScan.allowPaths in aisdlc.json holds regular expressions on file paths. GitleaksConfig.psm1 adds them as a second allowlist, and the pre-flight, the C03 gate and Create-GitleaksBaseline.ps1 pass the repository root, so all three skip the same paths. Create-GitleaksBaseline.ps1 now also uses the allowlist of the AI-SDLC.

Refs #12
…clone for a baseline

A repository widens its own secret scan with secretScan.allowPaths, so each pattern must be anchored, a valid regular expression, free of quotes and control characters, and must not match an ordinary file. A bad pattern stops the scan. The scan prints the paths it skips, so a reviewer sees a wider list in the gate output. Create-GitleaksBaseline.ps1 reads the list from the fresh clone, so the baseline follows what is committed.

Refs #12
@RobHofmann

Copy link
Copy Markdown
Owner Author

Second commit after a security review: a repository widens its own secret scan with secretScan.allowPaths, so the gate now refuses a pattern that is not anchored, that matches an ordinary file, that holds a quote or control character, or that is not a valid regular expression. The scan prints the paths it skips, so a change to the list shows in the diff of aisdlc.json and in the gate output. Create-GitleaksBaseline.ps1 reads the list from the fresh clone. 7 new test cases; 60 gitleaks tests and 58 pre-flight and config tests pass.

@RobHofmann RobHofmann changed the title Let a repository exclude paths that hold secrets on purpose from the secret scan Release v1.2.0: secret scan allow paths, and links in replies Nov 8, 2026
The scan now only refuses a pattern that would break the generated TOML file or that is not a valid regular expression. Which paths to skip, and how broad, is up to the repository.

Refs #12
@RobHofmann

Copy link
Copy Markdown
Owner Author

Latest commit: the scan no longer refuses a pattern for being too broad or not anchored. Which paths to skip is up to the repository. It still refuses a pattern with a quote or a control character, or one that is not a valid regular expression, and it still prints the paths it skips. The pull request also holds #14 now, the rule to give the full link to every pull request, issue or page a reply points to.

@RobHofmann
RobHofmann merged commit c8923fc into main Nov 8, 2026
16 checks passed
@RobHofmann
RobHofmann deleted the 12-secret-scan-allow-paths branch November 8, 2026 16:31
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