anordal/shellharden

The corrective bash syntax highlighter

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 58 minutes ago
Added to GitGenius on September 14th, 2026
Created on January 19th, 2017
Open Issues & Pull Requests: 10 (+0)
GitHub issues: Enabled
Number of forks: 133
Total Stargazers: 4,806 (+0)
Total Subscribers: 50 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 4.0 days
Mean response time: 63.9 days
90th percentile: 324.3 days
Tracked items: 6

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 4
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 747 days
Stale 30+ days: 4
Stale 90+ days: 2

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

Shellharden is a syntax highlighter and linter that semi-automates the rewriting of bash scripts to conform to ShellCheck recommendations, with particular focus on proper quoting practices.

The tool addresses the fundamental bash vulnerability where unquoted variables behave unpredictably through word splitting and glob expansion. Shellharden operates by displaying scripts with syntax highlighting in foreground colors while using background colors to suggest corrections. Its core capability is the `--transform` option, which applies these suggested changes automatically, effectively doing what ShellCheck can only recommend. The tool parses bash syntax to identify quoting issues and other vulnerable patterns, then presents both a visual representation of problems and the ability to fix them in a single pass.

Shellharden suits developers who maintain bash scripts and want to harden them against common vulnerabilities without manually implementing every ShellCheck suggestion. It works best for scripts where the developer can review changes and confirm the script does not intentionally rely on unquoted variable expansion. The tool differs from ShellCheck in that it provides automated correction rather than detection alone, though it assumes the user takes responsibility for code review before applying transformations. The README emphasizes that blind application of the transform option is unsafe; scripts that depend on word splitting or glob expansion will break, though the documentation suggests such patterns should generally be rewritten using safer alternatives like arrays.

The project maintains active test coverage instrumentation and includes fuzzing infrastructure to validate parser robustness. Development includes comprehensive test suites that require bash and tooling for coverage analysis and fuzz testing.