Skip to content

PR-02: Repo hygiene (scanner) - #25

Merged
emmanuelgjr merged 1 commit into
mainfrom
improve/pr-02-repo-hygiene
Jul 18, 2026
Merged

PR-02: Repo hygiene (scanner)#25
emmanuelgjr merged 1 commit into
mainfrom
improve/pr-02-repo-hygiene

Conversation

@emmanuelgjr

Copy link
Copy Markdown
Contributor

Phase 0 mechanical hygiene for the DSGAI scanner. Depends on PR-01 (merged).

What's here

  • README Non-goals section — states what the scanner deliberately won't do (secret-scanning reimpl, general SAST, rules without fixtures, weakening redaction). The maintainer's burnout shield.
  • .github/CODEOWNERS/dsgai_scanner_tool/ @emmanuelgjr.
  • .github/workflows/scanner-lint.yml — path-filtered to dsgai_scanner_tool/**: shellcheck -S warning on integrations/*.sh, yamllint on scanner YAML, and a deterministic internal markdown-link check. All three verified locally; actionlint clean.
  • scripts/check_md_links.py — dependency-free internal-link/anchor checker (chosen over a third-party external-URL action, which would be a flaky required gate needing an unverifiable SHA pin).
  • .gitattributes — forces LF on *.sh/*.py/*.yml/*.yaml. Prevents Windows autocrlf checkouts from shipping CRLF that breaks shellcheck/bash on Linux CI (a real failure I hit while validating).
  • DSGAI-samplereport.png — compressed 5.0 MB → 0.35 MB (14×), valid PNG, display-neutral at the README's 800px width.

Verification

  • shellcheck -S warning, yamllint, check_md_links.py, and actionlint all pass locally.
  • PNG is 359,976 bytes (≤400 KB target) and a valid PNG.

Notes / deviations

  • shellcheck is clean at warning level — the known mapfile (line 18) / grep -zE (line 20) portability bugs are bash-3.2/BSD concerns shellcheck can't detect without shell context, so there was nothing to # shellcheck disable. They're documented here and fixed in PR-10. The .sh file is intentionally left untouched (PR-10's scope).
  • PNG ≤400 KB required downscaling, not just palette quantization — the source is 1976×16384 px (a 2¹⁴ browser screenshot cap) with content throughout, so compression alone bottomed out ~750 KB. Downscaled to 560px native (display-neutral at 800px). PR-09 replaces this with a proper hero crop from the fixture app.
  • dependabot already covers the github-actions ecosystem; pip is added in PR-05 alongside the CLI manifest.
  • Annotated tag scanner-v0.2.0 created locally at the pre-improvement baseline; push held for your explicit approval per the plan (batched with the later release tags).

Follow-ups

  • PR-10: fix mapfile/grep -zE portability in dsgai-secret-scan.sh.
  • PR-09: regenerate the sample PNG from the fixture app.

…pression (PR-02)

- README: add a Non-goals section (the maintainer's scope shield).
- .github/CODEOWNERS: route dsgai_scanner_tool/ to @emmanuelgjr.
- .github/workflows/scanner-lint.yml: path-filtered lint (shellcheck -S warning,
  yamllint, deterministic internal markdown-link check). All three pass locally.
- scripts/check_md_links.py: dependency-free internal-link/anchor checker (no flaky
  external HTTP in a required gate).
- .gitattributes: force LF on *.sh/*.py/*.yml/*.yaml so Windows autocrlf checkouts
  can't ship CRLF that breaks shellcheck/bash on Linux CI.
- DSGAI-samplereport.png: 5.0 MB -> 0.35 MB (14x) interim compression; full
  regeneration from the fixture app lands in PR-09.

dependabot already covers the github-actions ecosystem; pip is added in PR-05 with the
CLI manifest. shellcheck is clean at warning level; the mapfile/grep -zE portability
issues (lines 18/20) are bash-3.2/BSD concerns shellcheck can't see without shell
context — deferred to PR-10 as planned. Annotated tag scanner-v0.2.0 created locally;
push held for maintainer approval per plan.
@emmanuelgjr
emmanuelgjr merged commit 089d42b into main Jul 18, 2026
8 checks passed
@emmanuelgjr
emmanuelgjr deleted the improve/pr-02-repo-hygiene branch July 18, 2026 05:18
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