Skip to content

feat(action): Marketplace-ready GitHub Action (prebuilt-binary) + github output format#10

Merged
cemililik merged 6 commits into
mainfrom
feat/github-marketplace-action
May 25, 2026
Merged

feat(action): Marketplace-ready GitHub Action (prebuilt-binary) + github output format#10
cemililik merged 6 commits into
mainfrom
feat/github-marketplace-action

Conversation

@cemililik
Copy link
Copy Markdown
Collaborator

@cemililik cemililik commented May 25, 2026

Summary

Makes Leakwatch usable from the GitHub Marketplace with one line — uses: HodeTech/Leakwatch@v1 — matching the low-friction adoption path of comparable tools. The action metadata moves to the repo root and installs a prebuilt, checksum-verified binary (no more go install compile-on-every-run). Also adds a CLI github output format for inline PR annotations, release/CI plumbing, and a self-test.

Decision record: ADR-0009.

What's included

Action (action.yml, moved to repo root from action/)

  • Composite action: downloads the prebuilt release archive for the runner and verifies its SHA-256 checksum before running (Linux/macOS). Retries on transient download failures.
  • New inputs: output, remediation, config, scan-diff, extra-args, working-directory, release-repo.
  • PR-diff scanning: scan-diff: auto limits git scans to commits new to the event (--since-commit); degrades to a full scan (with a warning) on a shallow checkout instead of hard-failing.
  • Writes a findings job summary to $GITHUB_STEP_SUMMARY.
  • Composite outputs now declare value: mappings (previously findings-count/sarif-file were never exposed).
  • Hardening: no raw-arg echo (path/extra-args may carry creds); extra-args rejects action-managed flags by prefix; nested upload-sarif is SHA-pinned.

CLI

  • New github output format (internal/output/github): emits ::error/::warning/::notice workflow commands for inline PR annotations. Never prints the raw secret; data/properties are percent-escaped; live-verified findings escalate to ::error. 100% test coverage. The format always writes to stdout even if an output file is configured.

Release & CI

  • release.yml moves the floating v1 tag to each stable vX.Y.Z release via the REST API (semver-guarded, skips pre-releases).
  • action-test.yml self-tests the action on ubuntu + macOS and lints all workflows with actionlint(+shellcheck); a cli-github-format job builds this branch to exercise --format github end-to-end.
  • ci.yml: least-privilege permissions, SHA-pinned actions, quoted coverage-gate substitution.

Docs

  • github-action.md & output-formats.md (EN+TR), README badge + usage, CHANGELOG, CLAUDE.md, decisions index; all leakwatch-action refs → Leakwatch. Regenerated site/js/manuals/*.js.

Reviews addressed

Two thorough external reviews were fully addressed across 9cdc2ac and 8726065: security (no arg logging, extra-args bypass via combined shorthand, SHA-pinning), correctness (scan-diff validation/degradation, friendly version errors, release-repo override so the self-test verifies the install path against real artifacts), formatter escalation + test gaps, and doc fixes (only-verified examples, dead setup-go steps, broken competitive-analysis table, binary-download example).

Verification (all green locally)

gofumpt -l ∅ · go vet · go build · golangci-lint run 0 issues · go test -race ./... 0 FAIL · actionlint+shellcheck clean. The install path is verified end-to-end against real release artifacts (same goreleaser archive naming) via the self-test.

⚠️ Release gate — do NOT publish/advertise @v1 until all three are true

This PR's code is ready to merge, but the action is non-functional for the public until the release sequence is done (inherent to the org migration, not a code defect):

  1. HodeTech/Leakwatch exists (repo transfer/creation; remote is currently cemililik/Leakwatch).
  2. A release containing this code is cut on that repo (so latest includes the github formatter and the binary download resolves).
  3. The v1 tag exists (created automatically by release.yml on the first vX.Y.Z).

Then tick Publish this Action to the GitHub Marketplace on the release. Until then, don't point users at @v1.

Notes

  • Scope also includes a docs commit (91a2c0d, ROADMAP/competitive-analysis) and the regenerated site bundle.
  • Windows runners are not supported yet (documented).
  • Checksum verification guards against corruption, not full provenance; cosign/SLSA is a documented future enhancement.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Official GitHub Marketplace Action supporting diff-based PR scanning, step summaries, and inline pull-request annotations
    • New github output format for GitHub Actions annotations with severity-level mapping
    • SHA-256 checksum verification for downloaded binaries
    • SARIF upload integration with GitHub Code Scanning
    • Action self-test workflow
  • Documentation

    • Updated README with Marketplace badge and action usage examples
    • Expanded CI/CD integration guides with new action inputs and diff-scanning details
    • New output format documentation for GitHub annotations
    • Architecture decision record for GitHub Marketplace action conventions
    • Updated roadmap with prioritized phases and deliverables
    • Multi-language documentation updates

Review Change Stack

cemililik and others added 5 commits May 25, 2026 00:01
…stall

Make Leakwatch usable from the GitHub Marketplace as
`uses: HodeTech/Leakwatch@v1`, matching the low-friction adoption path of
comparable tools.

Action (action.yml, moved to repo root from action/):
- Composite action that downloads the prebuilt release archive for the runner
  and verifies its SHA-256 checksum before running (Linux/macOS); replaces the
  compile-on-every-run `go install` approach.
- New inputs: output, remediation, config, scan-diff, extra-args,
  working-directory.
- PR-diff scanning: scan-diff=auto limits git scans to commits new to the event
  via --since-commit (PR base..HEAD / push before..HEAD).
- Writes a findings job summary to $GITHUB_STEP_SUMMARY (parsed from SARIF).
- Composite outputs now declare value: mappings, so findings-count/sarif-file
  are actually exposed (previously always empty).

CLI:
- New `github` output format emits ::error/::warning/::notice workflow commands
  for inline PR annotations. The raw secret is never printed (redacted only);
  command data/properties are percent-escaped. Registered in config.validFormats,
  selectFormatter, and the scan flag help. New internal/output/github package
  with 98% test coverage.

Release & CI:
- release.yml moves the floating major tag (v1) to each stable release via the
  REST API (gh), skipping pre-releases.
- action-test.yml self-tests the action on ubuntu+macos and runs actionlint
  (+shellcheck) over all workflows.
- ci.yml: quote the coverage-gate command substitution (SC2046) so the new
  actionlint job passes.

Docs:
- ADR-0009 records the decision (main-repo root + prebuilt-binary) and the manual
  Marketplace publish runbook.
- github-action.md and output-formats.md (EN+TR), README badge + usage,
  CHANGELOG, CLAUDE.md, and the decisions index updated; all `leakwatch-action`
  references switched to `Leakwatch`.

Linux/macOS runners only for now (composite + prebuilt binary); Windows is a
documented future enhancement.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ive secrets

Security:
- Stop echoing the assembled scan command (path/extra-args may carry tokens or
  authenticated URLs that GitHub log masking would not catch).
- Reject action-managed flags (--format/--output/--config/--show-raw) in
  extra-args so the action's output/summary/upload bookkeeping cannot be bypassed.
- SHA-pin github/codeql-action/upload-sarif (runs in consumers' repos) and pin
  actions/checkout, actions/setup-go and actionlint in action-test.yml and ci.yml;
  add a least-privilege permissions block to ci.yml.

Correctness/robustness:
- Add a release-repo input (default HodeTech/Leakwatch) so the self-test can
  target the current repo and verify the install path end-to-end (the canonical
  default still applies for consumers; org transfer auto-redirects).
- Validate scan-diff (auto|true|false) and fail loudly when "true" has no usable
  base commit instead of silently scanning full history.
- curl --retry on downloads; friendly ::error on a missing/invalid release tag;
  warn when only-verified is combined with no-verify (which reports nothing);
  guard absolute working-directory for the SARIF path; note summary truncation.
- github formatter: escalate live-verified findings to ::error regardless of
  severity. Formatter tests now cover %/\r escaping, verify-error, the write
  error path, and the escalation (100% coverage).
- release.yml: require a vX.Y.Z tag before moving the major tag.

CI:
- New cli-github-format job builds this branch and exercises --format github
  end-to-end (the released binary the action installs predates that format).
- selectFormatter test now covers the github format.

Docs:
- Fix only-verified examples (README, CI/CD guide) to set no-verify: false;
  remove now-dead setup-go steps before the action; fix the README binary-download
  example (goreleaser naming); document release-repo and the extra-args
  restriction; soften ADR-0009's checksum claim and record provenance as a
  future enhancement.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…de, doc/bundle sync

- extra-args guard now prefix-matches (-f*/-o*/--format*/--output*/--config*/
  --show-raw*), so combined shorthand like `-fcsv` or `-o/tmp/x` can no longer
  override the action's managed flags (the previous exact-token guard was
  bypassable; -f/-o are format/output only in this CLI).
- scan-diff: auto now degrades to a full scan with a ::warning:: when the base
  commit isn't in the local clone (shallow checkout), instead of letting
  leakwatch hard-fail (exit 2). scan-diff: true still fails with guidance.
- latest-version resolution: `|| true` on the redirect probe so a repo with no
  releases shows the curated ::error:: instead of aborting under set -e; message
  now names the repo and links its releases page.
- github format now always writes annotations to stdout even if an output file is
  configured (e.g. output.file in .leakwatch.yaml) — workflow commands are inert
  in a file, so this prevents silently swallowing them (cmd/scan_common.go).
- findings-count output description clarified (it is 0/1, not a count).
- Fix the broken comparison table in 01-COMPETITIVE-ANALYSIS.md (footnotes were
  mid-table, terminating it; moved to the end so the last rows render).
- Regenerate site/js/manuals/{en,tr}.js so the updated CI/CD manuals ship
  (the generated bundle was stale vs source).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@qodo-code-review
Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @cemililik, your pull request is larger than the review limit of 150000 diff characters

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

Warning

Review limit reached

@cemililik, we couldn't start this review because you've used your available PR reviews for now.

Your plan includes 1 review of capacity. Refill in 43 minutes and 19 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 00d44848-9870-4732-90cc-64bf3c3b60f9

📥 Commits

Reviewing files that changed from the base of the PR and between 8726065 and 47d2642.

📒 Files selected for processing (4)
  • .github/workflows/action-test.yml
  • .github/workflows/ci.yml
  • action.yml
  • docs/architecture/01-COMPETITIVE-ANALYSIS.md
📝 Walkthrough

Walkthrough

This pull request establishes a new root-level GitHub Action (HodeTech/Leakwatch@v1) for Leakwatch secret scanning with Marketplace-ready distribution. It adds prebuilt-binary installation with SHA-256 verification, optional SARIF upload to Code Scanning, and introduces a new GitHub annotation output formatter for inline PR annotations. CLI commands and documentation are updated to reflect the new action interface and formatter support.

Changes

GitHub Action Marketplace Release with Annotation Output

Layer / File(s) Summary
New action metadata and inputs/outputs contract
action.yml
Defines the HodeTech/Leakwatch composite action with configurable inputs spanning scan mode, output formatting, verification toggles, remediation/config, git-diff scanning, and release selection; declares findings-count and sarif-file outputs.
Action installation, scanning, and SARIF upload steps
action.yml
Implements three main workflow steps: install Leakwatch by resolving OS/arch, downloading and SHA-256-verifying the prebuilt release archive, extracting the binary to PATH; run leakwatch scan with diff-only validation for PR/push events, extra-args conflict rejection, and exit-code-to-findings mapping; conditionally upload SARIF to GitHub Code Scanning when enabled.
GitHub annotation formatter implementation
internal/output/github/github_formatter.go
Converts findings into GitHub workflow command annotations (::error, ::warning, ::notice), anchors findings to file/line properties when available, elevates verified-active findings to error level, and escapes workflow command payloads and properties to prevent parsing issues while never emitting raw secret values.
GitHub formatter comprehensive test coverage
internal/output/github/github_formatter_test.go
Tests validate annotation emission across all severity levels, verified-active elevation, file/line anchoring, property and payload escaping, raw secret redaction, multiple findings, error wrapping, and file extension behavior with test doubles for writer failures.
Command integration for github output format
internal/config/config.go, cmd/scan_common.go, cmd/scan_common_test.go
Adds "github" to supported output formats, extends selectFormatter switch to return GitHub formatter, and updates renderResult to disable file output for github format so annotations emit directly to stdout; test cases confirm github formatter selection.
CLI help text updates for github format
cmd/init.go, cmd/scan_fs.go, cmd/scan_gcs.go, cmd/scan_git.go, cmd/scan_image.go, cmd/scan_repos.go, cmd/scan_s3.go, cmd/scan_slack.go
Updates --format flag descriptions across all scan subcommands and the init template to advertise github as a supported output format with consistent messaging.
Action testing workflow and old action removal
.github/workflows/action-test.yml
Adds action-test.yml workflow with actionlint checking, tests of the composite action against dirty/clean fixtures with SARIF and annotation count assertions, and verification that scan fs --format github produces inline error annotations. Removes the old action/action.yml entirely.
CI workflow updates and release major-tag automation
.github/workflows/ci.yml, .github/workflows/release.yml
Updates ci.yml with explicit job permissions, pins action checkpoints to SHAs, and refactors bc coverage comparison. Adds release.yml step to move floating vMAJOR tag on stable releases (non-prerelease vX.Y.Z tags) using gh api.

Documentation and Guides

Layer / File(s) Summary
Project README and competitive positioning
README.md
Added GitHub Marketplace badge, reworked the "Why Leakwatch?" comparison table and "What makes Leakwatch different" claims, updated Quick Start binary installation guidance from curl-download to archive selection, and updated GitHub Actions example to use HodeTech/Leakwatch@v1 with no-verify: false and only-verified: true.
ADR-0009 and architecture documentation
docs/decisions/ADR-0009-github-marketplace-action.md, docs/decisions/README.md, docs/architecture/01-COMPETITIVE-ANALYSIS.md, CLAUDE.md
Documents the design decision to publish action metadata at repository root with prebuilt-binary composite install and floating v1 major tags; corrects competitive analysis claims about TruffleHog's Aho-Corasick and SARIF capabilities; updates architecture reference to root action.yml and adds ADR-0009 entry.
GitHub Actions integration guide (English)
docs/user-manuals/en/ci-cd/github-action.md
Updated all workflow examples to use HodeTech/Leakwatch@v1, expanded supported-runners note to exclude Windows, revised inputs table with new fields (output/format, remediation, config, scan-diff, extra-args, working-directory, release-repo), and added sections for diff-based git scanning with fetch-depth: 0 and inline PR annotations via format: github with redaction guidance.
GitHub Actions integration guide (Turkish)
docs/user-manuals/tr/ci-cd/github-action.md
Updated workflow examples, supported-runners note, and inputs table to match English documentation with HodeTech/Leakwatch@v1 usage, including new input fields and guidance for version pinning, diff scanning, and inline annotations.
Output formats documentation (English and Turkish)
docs/user-manuals/en/output/output-formats.md, docs/user-manuals/tr/output/output-formats.md
Added documentation for the new github output format describing annotation levels, severity mapping, file/line anchoring, and redaction behavior; updated CLI examples and common flags table to include --format github.
CI/CD integration guide
docs/guides/ci-cd-integration.md
Updated all workflow snippets (basic usage, SARIF scanning, full history, comprehensive workflow) to use HodeTech/Leakwatch@v1 instead of the older action and removed previously shown Go setup steps.
Roadmap and change documentation
docs/05-ROADMAP.md, CHANGELOG.md
Updated roadmap to version 7.0 with Phases 9–14 prioritized by accuracy, detector expansion, verification depth, source expansion, inventory, and honeytokens; updated Phase 5 GitHub Action deliverable description; added new release plan entries for v1.6.0–v1.11.0; updated documented gaps traceability; revised CHANGELOG to document new action distribution capabilities, annotation formatter, floating major tag behavior, and CI improvements.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐰 A Marketplace action hops to life,
With prebuilt binaries—no Go compile strife!
GitHub annotations dance inline and free,
While checksums verify what all should see.
V-one floats eternal—our secret's well-screened,
Ready for workflows where safety's convened! 🔐

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.93% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main changes: a Marketplace-ready GitHub Action featuring prebuilt-binary installation and a new github output format.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/github-marketplace-action

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 25, 2026

Not up to standards ⛔

🔴 Issues 2 medium

Alerts:
⚠ 2 issues (≤ 0 issues of at least minor severity)

Results:
2 new issues

Category Results
ErrorProne 2 medium

View in Codacy

🟢 Metrics 45 complexity · 19 duplication

Metric Results
Complexity 45
Duplication 19

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request prepares the Leakwatch GitHub Action for the Marketplace by moving the metadata to the repository root and transitioning from source compilation to prebuilt binary installation with SHA-256 verification. Key additions include a new github output format for inline PR annotations, automated job summaries, and PR diff scanning. Feedback focuses on improving the robustness of the action's shell script, specifically regarding the handling of absolute working directories for SARIF outputs and preventing unintended shell globbing when processing extra arguments.

Comment thread action.yml Outdated
Comment on lines +208 to +209
/*) echo "::warning::working-directory is absolute; the SARIF upload step may not locate the file. Use a repository-relative working-directory."
echo "sarif-file=$OUT" >> "$GITHUB_OUTPUT" ;;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

When working-directory is an absolute path, the sarif-file output is currently set to just $OUT (e.g., results.sarif). However, the file is actually created inside the absolute directory at ${WORKDIR}/$OUT. This will cause subsequent steps, such as the SARIF upload action, to fail because they expect a path relative to the repository root or a correct absolute path. It is better to provide the full path even when warning the user.

            /*) echo "::warning::working-directory is absolute; the SARIF upload step may not locate the file. Use a repository-relative working-directory."
                echo "sarif-file=${WORKDIR%/}/$OUT" >> "$GITHUB_OUTPUT" ;;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 47d2642. The non-. branch now reports ${WORKDIR%/}/$OUT for both relative and absolute working-directory values, so the SARIF upload step gets the actual path. The previous absolute-path case that emitted bare $OUT (and a warning) is removed.

Comment thread action.yml
# can never silently disagree with the actual CLI invocation.
if [ -n "$INPUT_EXTRA_ARGS" ]; then
# shellcheck disable=SC2206
extra=($INPUT_EXTRA_ARGS)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using unquoted expansion for extra-args is necessary here to support multiple flags, but it also enables shell globbing. If a user passes an argument containing a wildcard (for example, --exclude="*.go"), the shell will attempt to expand it to matching files in the current directory before passing the result to leakwatch. This can lead to unexpected behavior or scan failures. It is safer to disable globbing with set -f before performing the word-splitting assignment.

          set -f
          # shellcheck disable=SC2206
          extra=($INPUT_EXTRA_ARGS)
          set +f

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 47d2642. The extra=($INPUT_EXTRA_ARGS) word-split is now wrapped in set -f / set +f, so a bare glob token (e.g. --exclude *.go) is no longer pathname-expanded against the working directory before reaching leakwatch. Verified in bash. Word-splitting into separate args is still intended.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/action-test.yml:
- Around line 31-32: The checkout steps using actions/checkout (the two
occurrences shown as "uses:
actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3") should explicitly
disable persisted credentials by adding "persist-credentials: false" to each
actions/checkout step; update both checkout actions in the workflow so they
include that option to prevent the runner from persisting the GITHUB_TOKEN to
later steps.
- Around line 90-91: Replace the shell conditional assertions that use the "&&
... || { ... }" pattern with explicit if blocks: for the COUNT check, replace `[
"$COUNT" = "1" ] || { echo "::error::expected findings-count=1, got '$COUNT'";
exit 1; }` with an if/then/else that echoes the same error and exits non-zero
when the condition fails; likewise replace the SARIF check `[ -n "$SARIF" ] && [
-f "$SARIF" ] || { echo "::error::expected SARIF file at '$SARIF'"; exit 1; }`
with an explicit if that tests both conditions and errors/exits when they are
not met. Also add `persist-credentials: false` to every actions/checkout step
invocation (the steps using the `actions/checkout` action referenced at lines
near 31, 55, and 123) so each checkout step includes that key. Ensure behavior
and error messages remain identical after the change.

In @.github/workflows/ci.yml:
- Around line 19-20: The checkout steps in the CI workflow leave Git credentials
in the repo config; update every actions/checkout step (references: "uses:
actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3" and any other "uses:
actions/checkout" occurrences in the test, lint, and security jobs) to include
the input persist-credentials: false so credentials are not persisted to the
checked-out repository; ensure you add the persist-credentials: false key under
each checkout step and apply the same change to any other jobs that call
actions/checkout.

In `@docs/architecture/01-COMPETITIVE-ANALYSIS.md`:
- Around line 201-204: The document contradicts itself about TruffleHog custom
detectors; update the earlier statement that says "Go code + recompile" to match
the later note that TruffleHog supports YAML-based custom detectors via a
config.yaml detectors: block. Locate references to "TruffleHog", "config.yaml",
and the phrase "Go code + recompile" and replace or amend them so both sections
consistently state that TruffleHog supports custom detectors defined in YAML
(detectors:), while keeping any mention of optional Go-based extensions as a
secondary note if needed.

In `@docs/decisions/ADR-0009-github-marketplace-action.md`:
- Line 105: Replace the lowercase "github" in the user-facing sentence that
mentions PR-diff scanning and the `github` output format with the official
"GitHub" capitalization; locate the string in
ADR-0009-github-marketplace-action.md (the line containing "PR-diff scanning
(`--since-commit`) and the `github` output format") and update it to "GitHub" to
ensure consistent, correct branding.

In `@docs/user-manuals/en/output/output-formats.md`:
- Line 170: Replace the hash-route internal link `[GitHub
Action](`#/ci-cd/github-action`)` with a relative docs path (e.g.,
`../ci-cd/github-action.md` or appropriate relative location) so the link is
lint-safe and portable; locate the occurrence by searching for the link text
"GitHub Action" or the route '`#/ci-cd/github-action`' near the phrase "format:
github" and update it to the correct relative Markdown path while preserving the
link label and surrounding sentence.

In `@docs/user-manuals/tr/output/output-formats.md`:
- Line 170: Mevcut satırdaki iç bağlantı `[GitHub
Action](`#/ci-cd/github-action`)` hash-route kullanıyor; bunu proje doküman
standartlarına uygun olarak göreli bir Markdown bağlantısıyla değiştir: `[GitHub
Action](<relative-path-to-ci-cd-github-action-doc>)` — yani link hedefini
hash-route yerine doküman ağacındaki ilgili .md dosyasına göreli yol olarak
güncelle ve bağlantının çalıştığından emin ol; hedef link metni `[GitHub
Action]` olarak kalmalı.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7e8de285-0151-43af-a1f0-e07e1698e9e1

📥 Commits

Reviewing files that changed from the base of the PR and between d35f4bd and 8726065.

📒 Files selected for processing (32)
  • .github/workflows/action-test.yml
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • CHANGELOG.md
  • CLAUDE.md
  • README.md
  • action.yml
  • action/action.yml
  • cmd/init.go
  • cmd/scan_common.go
  • cmd/scan_common_test.go
  • cmd/scan_fs.go
  • cmd/scan_gcs.go
  • cmd/scan_git.go
  • cmd/scan_image.go
  • cmd/scan_repos.go
  • cmd/scan_s3.go
  • cmd/scan_slack.go
  • docs/05-ROADMAP.md
  • docs/architecture/01-COMPETITIVE-ANALYSIS.md
  • docs/decisions/ADR-0009-github-marketplace-action.md
  • docs/decisions/README.md
  • docs/guides/ci-cd-integration.md
  • docs/user-manuals/en/ci-cd/github-action.md
  • docs/user-manuals/en/output/output-formats.md
  • docs/user-manuals/tr/ci-cd/github-action.md
  • docs/user-manuals/tr/output/output-formats.md
  • internal/config/config.go
  • internal/output/github/github_formatter.go
  • internal/output/github/github_formatter_test.go
  • site/js/manuals/en.js
  • site/js/manuals/tr.js
💤 Files with no reviewable changes (1)
  • action/action.yml

Comment thread .github/workflows/action-test.yml
Comment thread .github/workflows/action-test.yml Outdated
Comment thread .github/workflows/ci.yml
Comment thread docs/architecture/01-COMPETITIVE-ANALYSIS.md
- Fast, reproducible, checksum-verified install.
- New inputs (`output`, `remediation`, `config`, `scan-diff`, `extra-args`,
`working-directory`) and a job summary improve the CI experience.
- PR-diff scanning (`--since-commit`) and the `github` output format (inline
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot May 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use the official GitHub capitalization in output-format text.

github should be GitHub in this user-facing sentence for consistency and correctness.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~105-~105: The official name of this software platform is spelled with a capital “H”.
Context: ...iff scanning (--since-commit) and the github output format (inline annotations) b...

(GITHUB)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/decisions/ADR-0009-github-marketplace-action.md` at line 105, Replace
the lowercase "github" in the user-facing sentence that mentions PR-diff
scanning and the `github` output format with the official "GitHub"
capitalization; locate the string in ADR-0009-github-marketplace-action.md (the
line containing "PR-diff scanning (`--since-commit`) and the `github` output
format") and update it to "GitHub" to ensure consistent, correct branding.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentionally left lowercase. Here `github` is the literal output-format value (--format github / the action's format: github), shown in code font — not the GitHub brand name. Capitalizing it to GitHub would misstate the actual CLI/action value, so it is correct as-is.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cemililik, you're absolutely right — `github` in code font is the literal CLI enum value (--format github) and must stay lowercase to match the actual flag value. Capitalizing it would introduce a factual error in the documentation. Apologies for the noise.

(∪・ω・∪)


✏️ Learnings added
Learnt from: cemililik
Repo: cemililik/Leakwatch PR: 10
File: docs/decisions/ADR-0009-github-marketplace-action.md:105-105
Timestamp: 2026-05-25T06:53:42.044Z
Learning: In the Leakwatch project (`docs/decisions/ADR-0009-github-marketplace-action.md` and related docs), the token `github` appearing in backtick code spans (e.g., `` `github` ``) refers to the literal CLI output-format value (`--format github` / action input `format: github`), not the GitHub brand name. It must remain lowercase and should not be flagged as a capitalization issue.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

::error file=config/prod.env,line=12,title=Leakwatch%3A aws-access-key-id::Potential secret detected by aws-access-key-id (critical): AKIA****K7NP
```

This format is normally driven by the [GitHub Action](#/ci-cd/github-action) (`format: github`) rather than invoked by hand.
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot May 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use a relative docs link instead of a hash-route internal link.

[GitHub Action](#/ci-cd/github-action) should be a relative path link to keep docs lint-safe and portable in Markdown renderers.

Suggested fix
-This format is normally driven by the [GitHub Action](`#/ci-cd/github-action`) (`format: github`) rather than invoked by hand.
+This format is normally driven by the [GitHub Action](../ci-cd/github-action.md) (`format: github`) rather than invoked by hand.

As per coding guidelines: "docs/**/*.md: Use relative paths for internal documentation links".

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
This format is normally driven by the [GitHub Action](#/ci-cd/github-action) (`format: github`) rather than invoked by hand.
This format is normally driven by the [GitHub Action](../../../ci-cd/github-action.md) (`format: github`) rather than invoked by hand.
🧰 Tools
🪛 GitHub Check: Codacy Static Code Analysis

[warning] 170-170: docs/user-manuals/en/output/output-formats.md#L170
Link fragments should be valid

🪛 LanguageTool

[uncategorized] ~170-~170: The official name of this software platform is spelled with a capital “H”.
Context: ...GitHub Action (format: github) rather than invoked by hand. ## Comm...

(GITHUB)

🪛 markdownlint-cli2 (0.22.1)

[warning] 170-170: Link fragments should be valid

(MD051, link-fragments)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/user-manuals/en/output/output-formats.md` at line 170, Replace the
hash-route internal link `[GitHub Action](`#/ci-cd/github-action`)` with a
relative docs path (e.g., `../ci-cd/github-action.md` or appropriate relative
location) so the link is lint-safe and portable; locate the occurrence by
searching for the link text "GitHub Action" or the route '`#/ci-cd/github-action`'
near the phrase "format: github" and update it to the correct relative Markdown
path while preserving the link label and surrounding sentence.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left as a hash route by design. These user manuals are rendered by a single-page docs portal that uses hash routing (#/section/page); #/ci-cd/github-action is the established convention used by ~140 sibling links across the manuals. A relative .md path would not resolve in the portal and would be inconsistent with every other internal manual link. The "relative paths" guideline applies to standalone Markdown, but these pages are SPA-routed — so skipping this one (and its TR twin) intentionally.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cemililik, understood — that's a clear and valid distinction. The #/section/page hash-routing convention for the SPA docs portal overrides the standalone-Markdown guideline, and applying relative .md paths there would break navigation. I'll record this for future reviews.

(ᵔ◡ᵔ)🐇


✏️ Learnings added
Learnt from: cemililik
Repo: cemililik/Leakwatch PR: 10
File: docs/user-manuals/en/output/output-formats.md:170-170
Timestamp: 2026-05-25T06:53:45.117Z
Learning: In the `cemililik/Leakwatch` repository, docs under `docs/user-manuals/` (both `en/` and `tr/` subtrees) are rendered by a single-page application (SPA) docs portal that uses hash routing. Internal cross-document links in these files intentionally use hash routes in the form `#/section/page` (e.g., `#/ci-cd/github-action`), not relative `.md` file paths. Relative `.md` paths would not resolve in the portal and would be inconsistent with ~140 existing sibling links. The coding guideline "use relative paths for internal documentation links" does NOT apply to files under `docs/user-manuals/`; do not flag hash-route links in those files as issues.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

::error file=config/prod.env,line=12,title=Leakwatch%3A aws-access-key-id::Potential secret detected by aws-access-key-id (critical): AKIA****K7NP
```

Bu format normalde elle çağrılmak yerine [GitHub Action](#/ci-cd/github-action) (`format: github`) tarafından kullanılır.
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot May 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

İç bağlantı için hash-route yerine göreli dosya yolu kullanın.

[GitHub Action](#/ci-cd/github-action) ifadesi, doküman standartlarına uygun şekilde göreli bağlantı olmalı.

Önerilen düzeltme
-Bu format normalde elle çağrılmak yerine [GitHub Action](`#/ci-cd/github-action`) (`format: github`) tarafından kullanılır.
+Bu format normalde elle çağrılmak yerine [GitHub Action](../ci-cd/github-action.md) (`format: github`) tarafından kullanılır.

As per coding guidelines: "docs/**/*.md: Use relative paths for internal documentation links".

🧰 Tools
🪛 GitHub Check: Codacy Static Code Analysis

[warning] 170-170: docs/user-manuals/tr/output/output-formats.md#L170
Link fragments should be valid

🪛 markdownlint-cli2 (0.22.1)

[warning] 170-170: Link fragments should be valid

(MD051, link-fragments)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/user-manuals/tr/output/output-formats.md` at line 170, Mevcut satırdaki
iç bağlantı `[GitHub Action](`#/ci-cd/github-action`)` hash-route kullanıyor; bunu
proje doküman standartlarına uygun olarak göreli bir Markdown bağlantısıyla
değiştir: `[GitHub Action](<relative-path-to-ci-cd-github-action-doc>)` — yani
link hedefini hash-route yerine doküman ağacındaki ilgili .md dosyasına göreli
yol olarak güncelle ve bağlantının çalıştığından emin ol; hedef link metni
`[GitHub Action]` olarak kalmalı.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left as a hash route by design. These user manuals are rendered by a single-page docs portal that uses hash routing (#/section/page); #/ci-cd/github-action is the established convention used by ~140 sibling links across the manuals. A relative .md path would not resolve in the portal and would be inconsistent with every other internal manual link. The "relative paths" guideline applies to standalone Markdown, but these pages are SPA-routed — so skipping this one (and its TR twin) intentionally.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cemililik, understood — that context makes total sense. The hash-route convention is the correct approach for an SPA docs portal, and flagging these as broken links would be a false positive going forward. I'll record this for future reviews.

(◕‿◕✿) 🐇


✏️ Learnings added
Learnt from: cemililik
Repo: cemililik/Leakwatch PR: 10
File: docs/user-manuals/tr/output/output-formats.md:170-170
Timestamp: 2026-05-25T06:53:44.746Z
Learning: In the `docs/user-manuals/` directory (both `en/` and `tr/` subtrees) of the Leakwatch repository, internal cross-document links intentionally use SPA hash-route syntax (`#/section/page`, e.g., `#/ci-cd/github-action`) instead of relative `.md` file paths. These docs are rendered by a single-page docs portal that uses hash routing; approximately 140 links across the manuals follow this convention. Suggesting replacement with relative `.md` paths would break navigation in the portal. Do not flag these hash-route links as invalid or suggest converting them to relative paths.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

…gs, sarif path

Valid findings fixed:
- Add `persist-credentials: false` to every actions/checkout step in
  action-test.yml and ci.yml (don't persist GITHUB_TOKEN; matches release.yml).
- action.yml: `set -f` around the extra-args word-split so a bare glob token
  (e.g. `--exclude *.go`) isn't pathname-expanded against the work dir before
  reaching leakwatch.
- action.yml: report the correct sarif-file path for a non-"." working-directory
  (relative or absolute) instead of bare $OUT, so the SARIF upload step finds it.
- action-test.yml: convert the finding/SARIF assertions to explicit if blocks
  (drops the `A && B || C` pattern; identical messages/behavior).
- 01-COMPETITIVE-ANALYSIS.md: reconcile the two "requires writing Go code and
  recompiling" claims with the corrected footnote — TruffleHog supports YAML
  custom regex detectors; only custom verification logic needs Go.

Skipped (not valid against current code):
- ADR-0009 lowercase `github`: it's the backticked literal output-format name
  (`--format github`); capitalizing would misstate the CLI value.
- output-formats.md `#/ci-cd/github-action` links: `#/` hash routes are the
  deliberate docs-portal (SPA) convention used by ~140 sibling manual links;
  switching one to a .md path would break portal navigation and be inconsistent.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@cemililik cemililik merged commit 1175800 into main May 25, 2026
7 of 11 checks passed
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