mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-25 18:56:20 +00:00
fix(security): prevent CWE-134 format string injection
- add "%s" to unsafe cons_show/log_*/win_println calls - add check-cwe134.sh static analysis script - integrate security check into CI pipeline Closes #85
This commit is contained in:
@@ -144,6 +144,16 @@ scan-build make
|
||||
scan-view ...
|
||||
```
|
||||
|
||||
### Security checks
|
||||
|
||||
We have a static analyzer `check-cwe134.sh` that detects CWE-134 format string vulnerabilities. It runs automatically in CI but you can also run it locally:
|
||||
|
||||
```bash
|
||||
./check-cwe134.sh
|
||||
```
|
||||
|
||||
This checks for unsafe patterns where user-controlled data could be passed directly as a format string to functions like `cons_show`, `log_error`, `win_println`, etc. Always use `"%s"` format specifier when printing user data.
|
||||
|
||||
### Finding typos
|
||||
|
||||
We include a `.codespellrc` configuration file for `codespell` in the root directory.
|
||||
|
||||
Reference in New Issue
Block a user