Repository navigation
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 —
githubannotations,markdown,csv, andjunit— 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, andshareguard-ignore-file, optionally scoped to named rules and counted in the summary assuppressed. --list-rules,--quiet,--fail-on none, and docs/RULES.md generated from the rule definitions, so every SARIFhelpUriresolves to an explanation.- A
.pre-commit-hooks.yamldefinition, and Action inputs forsince,include-rule,exclude-rule,category,concurrency,gitignore,quiet,annotations, andsummary, plus anexit-codeoutput 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
PublicandDefault. - The IPv6 rule required only two groups, so ordinary text such as
unreadable-file::Couldwas 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-extendedsuite. - 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: highMatched values are never printed in any output format. Full detail in CHANGELOG.md.