graudit: grep-based source code auditing with editable signatures
grep rough audit - source code auditing tool
At a glance
- What is it?
- graudit is a Shell-based static scanning tool that searches source code with GNU grep and POSIX extended regular expressions. It suits developers and security reviewers who want configurable checks without a compiled analysis suite.
- Who is it for?
- Adopt graudit when a team wants a small, scriptable grep-based review layer with editable POSIX regular-expression signatures. Do not treat its matches as proof of vulnerabilities or choose it when data-flow analysis, type-aware checks, or guaranteed low false-positive results are mandatory.
- Can I use it commercially?
- Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Yes. The repository last received commits 10 days ago.
- What is it written in?
- Mainly Shell, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.
Editorial analysis
graudit's grep-based source security review
graudit addresses a narrow but useful part of source code review: finding lines that match known security patterns. It is intended for developers, security reviewers, system administrators, and anyone who wants to add a repeatable grep pass to an existing review process. The README describes graudit as a "simple script and signature sets" and identifies GNU grep as its matching utility. It does not document a compiler-based parser or a semantic analysis engine.
The tool reads signature files, selects files under a given path, and reports source lines that satisfy regular expressions associated with insecure API use, risky constructs, or potential secrets. This design is useful when an audit must remain easy to script. The interface accepts a filesystem path, a named signature database, exclusions, context settings, and display options. The README also documents `GRARGS` for persistent default command-line options, while `GRDIR` lets a user select a custom signatures directory.
The tradeoff is equally clear. A grep pattern can reveal suspicious constructs, but it cannot by itself establish whether input reaches a dangerous function, whether a validation routine neutralizes it, or whether a test file contains an intentional example. graudit should be treated as a discovery aid for static security auditing, not as an automatic vulnerability verdict. Its documentation says "potential security flaws," which correctly reflects the limits of pattern matching.
Signature loading and scan flow in graudit
The documented mechanism begins with the `-d <dbname>` option. Omitting it selects the `default` database. A database is a collection of POSIX extended regular expressions, allowing the existing rule sets to be extended or replaced with organization-specific signatures. The README lists language-oriented databases for C, Go, Java, JavaScript, Python, Ruby, PHP, Perl, TypeScript, Scala, Nim, COBOL, Android, iOS, ASP.NET, Eiffel, and other areas. It also lists categories such as `secrets`, `sql`, `xss`, `exec`, and `strings`.
Database resolution is ordered, so the effective signatures can depend on the environment. The README places a custom directory specified by `GRDIR` first, followed by `/usr/share/graudit/`, `$HOME/.graudit/`, directories relative to the graudit executable, `$HOME/graudit/signatures/`, a file selected with a full path, and standard input through `-` or `/dev/stdin`. This flexibility supports controlled scans and custom rule sets. It also means that two installations can use different files. An operator should check `graudit -l` before a review so the active databases and their precedence are visible.
The `-i` switch makes matching case-insensitive. `-c <num>` controls how many lines before and after a match are printed, with a documented default of `1`. File selection also affects results. `-x` accepts comma-separated patterns such as `*.js` and `*.sql`, while `-A` includes unwanted and difficult files. A clean report can reflect exclusions, while a noisy report can reflect generated or vendor code. The README does not document a formal severity model, so reviewers must interpret each match.
Installing graudit from the repository
The README recommends cloning the Git repository because it includes additional database rules and permits updates between releases. Use the documented command to download the project:
git clone https://github.com/wireghoul/grauditAfter cloning, add the repository directory to the current user's Bash path with the README's configuration command:
echo 'PATH="$HOME/graudit:${PATH:+:${PATH}}"; export PATH;' >> ~/.bashrcThis appends the path setting to `~/.bashrc`. A new shell or another documented shell action is required before that startup-file change necessarily affects the current session; the README does not specify such an action. If graudit is not in the home directory, point `GRDIR` at its signatures directory:
export GRDIR=/path/to/graudit/signaturesThe project also documents local installation through the Makefile. The documented targets are `make userinstall` and `make install`, run after cloning. Based on the Makefile, `userinstall` copies signatures into `~/.graudit` and the graudit script into `~/bin`. The `install` target uses `/usr` as its default prefix and is intended for global installation. Both targets invoke repository test prerequisites, so their exact execution can also depend on the files and tools present in the checkout.
A first graudit scan with documented options
Use the documented help command to inspect the options supported by the available graudit script:
graudit -hThe README presents its basic usage form as:
graudit [opts] /path/to/scanReplace `/path/to/scan` with the filesystem path being reviewed. Without `-d`, the script uses the `default` database. To inspect which database files are visible under the current database precedence rules, use:
graudit -lOutput presentation can be changed without changing the underlying matching design. The README documents `-B` to suppress the banner, `-L` for Vim-friendly lines, `-b` for a color-blind-friendly template, `-z` to suppress colors, and `-Z` for high-contrast colors. Persistent defaults can be set through `GRARGS`, although the README cautions that arbitrary defaults can affect scripts. It recommends limiting that variable to display-related `B,L,b,z` or `Z` options.
The documentation does not promise a fixed result count or output format. Actual matches depend on the signatures, source files, scan path, exclusions, and local GNU grep behavior. The `-c <num>` option changes how much context surrounds a match, while `-i` enables case-insensitive scanning. This makes the first run most useful as a review aid that identifies locations for manual inspection, not as a pass or fail security gate.
graudit database scope and rule customization
graudit separates its executable behavior from its detection content through signature databases. The README says these signatures use POSIX extended regular expressions. Teams can extend an existing database or create their own when bundled rules do not reflect their code. That is a practical advantage when an organization has internal logging functions, framework APIs, deployment scripts, or naming conventions that should be searched consistently.
The repository's Makefile lists signature files for numerous languages and categories, including `docker.db`, `kotlin.db`, and `jwt.db` alongside the `actionscript`, `android`, `asp`, `c`, `cobol`, `dotnet`, `exec`, `fruit`, `go`, `ios`, `java`, `js`, `nim`, `perl`, `php`, `python`, `ruby`, `scala`, `secrets`, `spsqli`, `sql`, `strings`, `typescript`, and `xss` databases named in the README. The two lists are not identical, which matters when comparing a checkout with an installed package. The README specifically recommends cloning because the repository includes additional database rules not included in distribution files.
The `-d` option accepts either a database name or a full path to a `.db` file. Standard input can also supply rules through `-` or `/dev/stdin`. These loading paths support ad hoc rules, but a reproducible audit needs a recorded database selection and a known rule source. The README does not document signature versioning independent of graudit releases, nor does it provide a formal process for validating false positives. Organizations that depend on custom rules must manage that content themselves.
Maintenance, releases, and GPL upgrade cost
The repository is not archived. Its last push was on 2026-10-13. Recent releases include v4.1 on 2026-10-13, v4.0 on 2025-12-19, and v3.9 on 2025-05-22. These records show recent project activity, but they do not prove that every rule is current for a particular framework. Because graudit is primarily written in Shell and relies on external GNU grep, an upgrade can affect the launcher, database selection, rule content, and assumptions about the local command-line environment.
The project is licensed under GPL-3.0. That license governs use, modification, and distribution under its terms. This article does not interpret those terms or provide legal advice. A team redistributing graudit or incorporating it into a packaged workflow should review the repository `LICENSE` directly.
Maintenance cost is not limited to copying a new script. Administrators must compare signature directories, check whether `GRDIR` points at stale rules, and confirm that custom databases remain compatible with the installed version. Local installations use `~/.graudit`, while a global installation defaults to `/usr/share/graudit/`. A checkout may also rely on the signatures directory relative to the executable. Mixing these locations can make the same command produce different findings. The README does not document a rollback procedure, so teams that require a reversible upgrade process must retain a known copy of the executable and signature set.
Limits of graudit and its documented alternatives
The principal limitation is the absence of semantic context in the documented grep-based approach. A POSIX regular expression can identify a suspicious spelling or API reference, but it does not determine whether the associated value is attacker-controlled. This can produce false positives in tests, generated code, documentation, and wrappers. It can also miss flaws whose syntax does not resemble a bundled signature. graudit is the wrong tool when the audit requires interprocedural data-flow analysis, precise taint tracking, type checking, or a proven finding rather than a candidate location.
The README names RATS, SWAAT, and flaw-finder as comparable static analysis applications. That establishes an alternative category, but the graudit README does not describe those tools' matching methods, rule formats, installation procedures, or false-positive behavior. The concrete documented difference is graudit's own design: it uses GNU grep with POSIX extended regular expression signature sets and seeks to keep technical requirements and flexibility manageable. A team selecting RATS must consult RATS documentation for details not covered here. A team selecting graudit accepts pattern-based review in exchange for a small Shell workflow.
The project also has a different role from a complete security program. Signature matches can prioritize files for review, help enforce a recurring grep pass, and support custom internal checks. They do not replace threat modeling, code review, dependency analysis, runtime testing, or remediation tracking. The README supports no claim that graudit produces exhaustive results.
Editorial conclusion
Adopt graudit when a team wants a small, scriptable grep-based review layer with editable POSIX regular-expression signatures. Do not treat its matches as proof of vulnerabilities or choose it when data-flow analysis, type-aware checks, or guaranteed low false-positive results are mandatory. Before adoption, inspect the relevant language database and confirm that GNU grep and the expected shell environment are available on every scanning host.
Frequently asked questions
How do I install graudit from Git?
The README recommends cloning `https://github.com/wireghoul/graudit` and adding the cloned directory to `PATH`. It also documents `make userinstall` for a user installation and `make install` for a global installation.
Which database does graudit use by default?
The README identifies `default` as the database used when the `-d` argument is omitted. Use `graudit -l` to list the database files visible through the documented search order.
Can graudit exclude JavaScript and SQL files?
Yes. The documented `-x` option accepts a comma-separated list, with `*.js,*.sql` given as the example. The `-A` option instead scans unwanted and difficult files.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/wireghoul-graudit)Was this useful?