checksec
$ checksec Official Low Riskchecksec (checksec) inspects compiled ELF/Mach-O binaries, running processes, and kernel security flags for exploit mitigations such as RELRO, stack canaries, NX, PIE, Fortify, and RPATH/RUNPATH. Supports --output=json for zero-ambiguity machine parsing.
brew install checksec checksec inspects local compiled ELF/Mach-O artifacts directly via readelf/otool with structured --output=json.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Clean --output=json mode (plus CSV/XML) and non-interactive flag invocation with zero prompts.
- Native
--output=jsonoutput on--fileand--dir - Non-interactive execution
Strictly read-only header inspection using OS binutils without executing target binaries.
- Purely static read-only metadata inspection
Bash script depending on host tools (readelf, file, otool, objdump), limited to Linux and macOS (no Windows).
- Linux/macOS only; relies on host binutils/Xcode tools
Verifies compiler hardening flags across CI build outputs in a single command.
- Checks RELRO, Canary, NX, PIE, RPATH, and Fortify together
Maintained at slimm609/checksec under BSD-3-Clause (with recent Go/script evolution).
- Canonical
slimm609/checksecupstream
Clear README and --help covering output formats and target modes.
- Well-documented flags on slimm609.github.io/checksec
Security, Auth & Guardrails
No authentication credentials used; inspects local binaries and /proc read-only.
BSD-3-Clause open-source CLI; free and offline.
# checksec Agent Rules - Always pass `--output=json` so mitigation fields are structured rather than ANSI-colored tables. - Confirm target binaries match the host OS (`readelf` on Linux ELF; `otool` on macOS Mach-O).
Agent-Ready Command Recipes
Safe Read-Only Queries
checksec --output=json --file=./build/app
Audits ./build/app for RELRO, Canary, NX, PIE, and Fortify flags and emits clean JSON.
checksec --output=json --dir=./build/bin
Recursively checks executables inside ./build/bin and outputs consolidated JSON results.
Strengths for Agents
- +
--output=jsonturns messyreadelf/otoolhardening checks into clean structured JSON. - + Purely static and read-only—never executes the inspected binary.
Caveats & Pitfalls
- ! No Windows support; macOS Mach-O inspection covers fewer mitigation fields than Linux ELF.