Skip to content

feat(sdk-review): batch 3/6 — safety-first checks#204

Merged
tiagoek merged 2 commits into
feat/sdk-review-skillfrom
feat/sdk-review-batch-3
Jul 7, 2026
Merged

feat(sdk-review): batch 3/6 — safety-first checks#204
tiagoek merged 2 commits into
feat/sdk-review-skillfrom
feat/sdk-review-batch-3

Conversation

@tiagoek

@tiagoek tiagoek commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

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_metrics enforcement). 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:

  • Compiles alone (shellcheck / ruff pass)
  • Testable alone (bats/pytest pass on top of the prior batches)
  • Revert-safe (prior batches keep working if this one is reverted)
  • No breaking changes for subsequent batches

Related Issue

Internal tracking: AFSDK-3937

Type of Change

  • New feature (non-breaking change that adds functionality)

How to Test

git checkout feat/sdk-review-batch-3
bats tests/sdk-review/          # if applicable to this batch
shellcheck -x --severity=error .claude/scripts/**/*.sh

Batch progression

After all 6 batches are merged into feat/sdk-review-skill, a final cosmetic PR will merge feat/sdk-review-skill into main.

Checklist

  • Follows Conventional Commits
  • Isolated (see criteria above)
  • No sensitive information (fixture strings are placeholder patterns, not real credentials)

@tiagoek tiagoek changed the base branch from feat/sdk-review-skill to feat/sdk-review-batch-2 July 6, 2026 15:06
@tiagoek tiagoek force-pushed the feat/sdk-review-batch-2 branch from be587a4 to f4a2abd Compare July 6, 2026 15:17
@tiagoek tiagoek force-pushed the feat/sdk-review-batch-3 branch from 1284315 to 2ca08b4 Compare July 6, 2026 15:18
@tiagoek tiagoek force-pushed the feat/sdk-review-batch-2 branch from f4a2abd to 49f7089 Compare July 6, 2026 15:51
@tiagoek tiagoek force-pushed the feat/sdk-review-batch-3 branch from 2ca08b4 to 597305e Compare July 6, 2026 15:52
@tiagoek tiagoek force-pushed the feat/sdk-review-batch-2 branch from 49f7089 to 0c8b36f Compare July 6, 2026 15:59
@tiagoek tiagoek force-pushed the feat/sdk-review-batch-3 branch from 597305e to 9cf9da1 Compare July 6, 2026 15:59
tiagoek added 2 commits July 6, 2026 17:11
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)
@tiagoek tiagoek force-pushed the feat/sdk-review-batch-2 branch from 0c8b36f to 699d0e1 Compare July 6, 2026 20:13
@tiagoek tiagoek force-pushed the feat/sdk-review-batch-3 branch from a025df1 to 46f1495 Compare July 6, 2026 20:13
Base automatically changed from feat/sdk-review-batch-2 to feat/sdk-review-skill July 7, 2026 15:08
@tiagoek tiagoek merged commit 46f1495 into feat/sdk-review-skill Jul 7, 2026
3 checks passed
@tiagoek tiagoek deleted the feat/sdk-review-batch-3 branch July 7, 2026 15:08
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