Skip to content

ShareGuard v0.4.0

Latest

Choose a tag to compare

@6fmh 6fmh released this 21 Aug 22:15
· 2 commits to main since this release
61f28f4

ShareGuard v0.4.0 grows detection from 44 to 71 rules, adds four output formats and inline suppression, and hardens the GitHub Action and workflows.

Added

  • 27 new rules (44 to 71). Secrets: AWS secret access keys, Azure Storage account keys, RubyGems, Docker Hub, OpenRouter, Groq, Hugging Face, Replicate, Perplexity, Atlassian, Airtable, Supabase, Postman, Figma, New Relic, SonarQube, Sentry DSNs, Mailgun, Mailchimp, and credentials embedded in URLs. Privacy: Luhn-validated payment card numbers and US Social Security numbers, both excluding documentation and reserved ranges. Risky files: key and credential stores, service-account keys, and Terraform state and variable files. Hygiene: editor backups and operating system metadata files.
  • --since <ref> scans only the files changed since a Git reference, so pull-request jobs review just the diff.
  • Four output formats — github annotations, markdown, csv, and junit — alongside text, JSON, and SARIF, plus repeatable --report <format>[:<file>] so one scan can annotate a pull request, write SARIF, and store a summary.
  • Inline suppression: shareguard-ignore, shareguard-ignore-line, shareguard-ignore-next-line, and shareguard-ignore-file, optionally scoped to named rules and counted in the summary as suppressed.
  • --list-rules, --quiet, --fail-on none, and docs/RULES.md generated from the rule definitions, so every SARIF helpUri resolves to an explanation.
  • A .pre-commit-hooks.yaml definition, and Action inputs for since, include-rule, exclude-rule, category, concurrency, gitignore, quiet, annotations, and summary, plus an exit-code output and a Markdown job summary.

Fixed

  • The local Windows user path rule could never match; it now recognizes drive-letter home paths with either slash and ignores shared accounts such as Public and Default.
  • The IPv6 rule required only two groups, so ordinary text such as unreadable-file::Could was reported as a private address.
  • Action inputs containing a line break or a leading dash are rejected, closing an argument-injection path from workflow inputs into the CLI.
  • The syntax-check list was hand-maintained, had drifted, and skipped a source file; it is now a directory walk.

Changed

  • The private-key rule also recognizes PGP, encrypted, and SSH2 key blocks.
  • The Action defaults to format: github, so findings appear as inline annotations without extra configuration.
  • Every action is pinned to a commit SHA, checkout no longer persists credentials, workflow permissions are scoped per job, and CodeQL runs the security-extended suite.
  • The release workflow verifies that the tag, package.json, and CLI versions agree before packing.

Install

npm install --global github:6fmh/shareguard-cli#v0.4.0
shareguard . --fail-on high
- uses: 6fmh/shareguard-cli@v0.4.0
  with:
    fail-on: high

Matched values are never printed in any output format. Full detail in CHANGELOG.md.