feat(sdk-review): batch 3/6 — safety-first checks#204
Merged
Conversation
be587a4 to
f4a2abd
Compare
1284315 to
2ca08b4
Compare
f4a2abd to
49f7089
Compare
2ca08b4 to
597305e
Compare
49f7089 to
0c8b36f
Compare
597305e to
9cf9da1
Compare
Adds the 5 highest-value check scripts: ## Checks (.claude/scripts/) - check-secrets.sh — SEC-01..10 (AWS, JWT, GitHub PAT, Google, Slack, private keys, .env files). All BLOCK_LOCKED (non-suppressible). - check-license-spdx.sh — LIC-01/02 (SPDX + copyright headers on new files). Respects REUSE.toml aggregate at repo root — auto-exempted here. - check-disclosure.sh — DIS-01..08 (SAP-internal URLs, Jira leaks, internal artifactory, unfilled PR template placeholders). Public/internal profile switch. DIS-06 BLOCK_LOCKED. - check-hardcode.sh — HC-01..06 (URLs, credentials, magic timeouts, direct os.environ access). HC-03 (SAP-internal in public repo) BLOCK_LOCKED. - check-telemetry.sh — PY-TEL-01..07 (@record_metrics on public *Client methods; test asserts emission). Uses ast_python_checks.py from batch 1. All checks are self-review protected via lib/skill-self-skip.sh — the skill won't fire on its own regex/fixture strings. **Standalone testable.** Each check reads a diff on stdin and emits JSON. Not yet wired into an orchestrator; that comes in batch 6. Part 3 of 6. Ref: AFSDK-3937
- check-secrets: SEC-08 [[:space:]], SEC-04 handles Anthropic sk-…-… keys,
SEC-10 matches .env in subdirs
- check-disclosure: DIS-06 [[:space:]]+, dedupe DIS-01 when DIS-02 fires
- check-hardcode: HC-01 URL regex portable across BSD/GNU grep (positive char
class instead of negated bracket with escapes); allowlist restricted to IANA
reserved names (localhost/127.0.0.1/example.{com,org,net}/*.example/reserved.);
HC-06 word boundary so default_timeout, my_timeout don't match
- check-license-spdx: baseline-exempted PASS report now emits the same JSON
shape (summary.pass_criteria_met/failed) as normal reports
- check-telemetry: source lib/skill-self-skip.sh; scope PY-TEL-06 decorator
count to client_files only (previously counted @record_metrics anywhere,
including tests and skill files)
0c8b36f to
699d0e1
Compare
a025df1 to
46f1495
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds 5 highest-value check scripts:
check-secrets(10 secret patterns, all BLOCK_LOCKED),check-license-spdx(respects REUSE.toml),check-disclosure(SAP-internal URL leak protection),check-hardcode,check-telemetry(@record_metricsenforcement). Each check is invocable standalone; orchestrator wires them up in batch 6.This is part 3 of 6 in the incremental delivery of the SDK Module Review skill (AFSDK-3937).
Each sub-PR is scoped to be reviewable in ≤ 30 minutes and satisfies these isolation criteria:
Related Issue
Internal tracking: AFSDK-3937
Type of Change
How to Test
Batch progression
After all 6 batches are merged into
feat/sdk-review-skill, a final cosmetic PR will mergefeat/sdk-review-skillintomain.Checklist