Skip to content

ci: harden OSS leak checks#628

Closed
jonathanhaaswriter wants to merge 3 commits into
mainfrom
sec-923-leak-prevention-hook
Closed

ci: harden OSS leak checks#628
jonathanhaaswriter wants to merge 3 commits into
mainfrom
sec-923-leak-prevention-hook

Conversation

@jonathanhaaswriter
Copy link
Copy Markdown
Collaborator

Summary\n- expand OSS leak deny patterns and add inline allow handling\n- syntheticize public fixtures away from Writer-specific domains, tenants, and runtime IDs\n- add arch coverage for required leak-pattern categories\n\n## Validation\n- go test ./...\n- make lint check-structural check-structural-test check-arch oss-audit\n- ./scripts/leak_check.sh staged\n- ./scripts/leak_check.sh range origin/main...HEAD\n- actionlint .github/workflows/release.yml\n- git diff --cached --check

@factory-droid
Copy link
Copy Markdown
Contributor

factory-droid Bot commented May 22, 2026

Droid finished @jonathanhaaswriter's task —— View job


I validated all three candidates against the diff and surrounding code, and each one points to a real regression introduced by this PR. The leak-check changes weaken coverage in two places, and the Jira fixture rewrite breaks both SDK Jira test suites by expecting the wrong tenant segment in generated URNs.

Comment thread tools/archtests/leak_patterns_test.go Outdated
Comment thread scripts/leak_check.sh Outdated
Comment thread sdk/python/tests/test_jira.py Outdated
@jonathanhaaswriter jonathanhaaswriter force-pushed the sec-923-leak-prevention-hook branch from ebccd94 to 14e301c Compare May 22, 2026 04:58
@factory-droid
Copy link
Copy Markdown
Contributor

factory-droid Bot commented May 22, 2026

Droid finished @jonathanhaaswriter's task —— View job


I validated the empty candidate set against the full PR diff and the previously risky leak-check and Jira fixture areas, and I did not find any remaining high-confidence, line-anchored issues to post. The diff now looks like coordinated fixture sanitization with matching test updates.

@jonathanhaaswriter jonathanhaaswriter force-pushed the sec-923-leak-prevention-hook branch from 14e301c to 5016be8 Compare May 22, 2026 05:21
@factory-droid
Copy link
Copy Markdown
Contributor

factory-droid Bot commented May 22, 2026

Droid finished @jonathanhaaswriter's task —— View job


I validated both candidates against the full diff and surrounding behavior. One candidate is a real security regression introduced by this PR, while the dotted-ref issue is pre-existing behavior on an unchanged line and should not be posted as a PR comment.

Comment thread scripts/leak_check.sh Outdated
@jonathanhaaswriter jonathanhaaswriter force-pushed the sec-923-leak-prevention-hook branch from 5016be8 to 96bb510 Compare May 22, 2026 05:51
@factory-droid
Copy link
Copy Markdown
Contributor

factory-droid Bot commented May 22, 2026

Droid finished @jonathanhaaswriter's task —— View job



I validated both candidates against the full diff and surrounding code. Both are real, non-duplicate issues: the new inline-allow escape hatch still fails the repo's own local pre-commit flow, and the GitHub fixture now mixes example discovery URNs with writer read-event tenancy/org metadata.

Comment thread scripts/oss_audit.py
Comment thread sources/github/testdata/read.json
@jonathanhaaswriter jonathanhaaswriter force-pushed the sec-923-leak-prevention-hook branch from 96bb510 to 205ace1 Compare May 22, 2026 13:49
@factory-droid
Copy link
Copy Markdown
Contributor

factory-droid Bot commented May 22, 2026

Droid finished @jonathanhaaswriter's task —— View job


I validated both candidates against the full diff and surrounding code. Both are real, non-duplicate regressions: the public leak-pattern file now republishes Writer-specific literals that the scanners skip, and the VulnView token-url test no longer exercises the token URL validation path.

Comment thread scripts/leak_patterns.txt Outdated
Comment thread sources/vulnview/source_test.go Outdated
@jonathanhaaswriter jonathanhaaswriter force-pushed the sec-923-leak-prevention-hook branch from 205ace1 to e4dfe9d Compare May 22, 2026 14:14
@factory-droid
Copy link
Copy Markdown
Contributor

factory-droid Bot commented May 22, 2026

Droid finished @jonathanhaaswriter's task —— View job


Validated 1 review candidate for PR #628.

Approved 1 comment for posting.

The leak-check hardening is mostly sound, but the new shared git-diff helpers still include repository-root .pem/.crt files because the recursive exclude pathspecs only match nested paths. That can trigger false-positive leak-check failures in staged, range, and push scans whenever a root cert/key file is part of the diff.

Comment thread scripts/leak_check.sh
@jonathanhaaswriter jonathanhaaswriter force-pushed the sec-923-leak-prevention-hook branch from e4dfe9d to 885a8ce Compare May 22, 2026 14:46
@factory-droid
Copy link
Copy Markdown
Contributor

factory-droid Bot commented May 22, 2026

Droid finished @jonathanhaaswriter's task —— View job


I validated both GCP fixture candidates against the full diff and surrounding source behavior. Both point to real, non-duplicate regressions: the service-account discovery and IAM role-assignment fixtures no longer match the live GCP source after this PR's sanitization updates.

Comment thread sources/gcp/testdata/discover_service_account.json Outdated
Comment thread sources/gcp/testdata/read_iam_role_assignment.json Outdated
Co-authored-by: Repo Agent <agent@writer.com>
@factory-droid
Copy link
Copy Markdown
Contributor

factory-droid Bot commented May 22, 2026

Droid finished @jonathanhaaswriter's task —— View job


Validated 1 review candidate for PR #628.

Approved 1 comment for posting.

I validated the candidate against the full PR diff and surrounding code. The fixture sanitization is mostly consistent, but this test still asserts against the old writer tenant and no longer guards the Okta ephemeral-resource suppression path the PR is changing.

Comment thread internal/sourceprojection/projector_test.go Outdated
Co-authored-by: Repo Agent <agent@writer.com>
@factory-droid
Copy link
Copy Markdown
Contributor

factory-droid Bot commented May 22, 2026

Droid finished @jonathanhaaswriter's task —— View job


Phase 2 Validation Complete

Validated 1 candidate comment for PR #628 and approved 0 for posting.

The candidate identified a real inline-allow CI bypass concern, but it duplicates an existing posted security finding, so no additional batched review comments were submitted.

Artifact written to /home/runner/work/_temp/droid-prompts/review_validated.json.

@jonathanhaaswriter
Copy link
Copy Markdown
Collaborator Author

Replaced by #715, which reapplies the mergeable leak-check hardening on top of current main without the stale fixture rewrites from this disconnected-history branch. #715 is merged.

@jonathanhaaswriter jonathanhaaswriter deleted the sec-923-leak-prevention-hook branch May 30, 2026 02:01
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