Repository navigation
Releases
Releases · 6fmh/shareguard-cli
ShareGuard v0.4.0
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.
v0.3.0
Added
- Provider secret detection for OpenAI, Anthropic, Google OAuth client secrets, Azure client secrets, Slack app tokens and incoming webhook URLs, Discord and Telegram bot tokens, Twilio account and API-key SIDs, HashiCorp Vault, Terraform Cloud, Doppler, Grafana service-account and cloud tokens, Cloudflare, Square, Shopify, Notion, and Linear.
- Privacy detection for non-documentation IPv6 addresses.
Fixed
- Passed the release tag and SARIF output path to workflow shells through environment variables instead of expression interpolation, removing a template-injection path.
- Replaced an uninitialized buffer allocation when decoding big-endian UTF-16 content, which could read stale heap bytes for odd-length input.
- Resolved finding line numbers with a precomputed line index, eliminating quadratic slowdown on match-dense files (10.5 s to 3 ms on a 1.4 MB worst case).
Changed
- Broadened the Stripe rule to cover restricted keys (
rk_live/rk_test) alongside secret keys. - Tightened the JWT rule to require a
eyJ-prefixed header and payload, reducing false positives. - Expanded the generic hard-coded credential rule to recognize more key names (secret key, access key, passphrase,
pwd) and unquoted values. - Broadened the placeholder filter so common dummy and reference values are not reported.
- Excluded link-local, broadcast, and multicast ranges from the IPv4 rule to reduce noise.
- Hardened the hard-coded credential rule against pathological backtracking on large inputs.
- Stopped the IPv4 rule from matching version strings such as
1.2.3.4.5, and the email rule from matching asset references such aslogo@2x.png.
Install
npm install --global github:6fmh/shareguard-cli#v0.3.0- uses: 6fmh/shareguard-cli@v0.3.0
with:
fail-on: highFull changelog: https://github.com/6fmh/shareguard-cli/blob/v0.3.0/CHANGELOG.md
v0.2.1
Full Changelog: v0.2.0...v0.2.1
ShareGuard v0.2.0
Highlights
- Added SARIF 2.1 output for GitHub code scanning.
- Added staged Git-index scanning with
--staged. - Added standard-input scanning with
--stdin. - Added versioned JSON output and deterministic exit codes.
- Added configuration validation and the
initcommand. - Added rule and category selection.
- Added bounded parallel scanning and safer encoding handling.
- Added conservative entropy detection.
- Added GitLab, npm, SendGrid, DigitalOcean, PyPI, and improved generic credential detection.
- Added baseline refresh support without storing secret values.
- Added a reusable GitHub Action.
- Added expanded CI, release automation, security documentation, and contributor templates.
Verification
- 34 automated tests passing.