Contributing¶
Contributions are welcome. This page covers everything you need to know before opening a PR.
Getting started¶
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/YOUR_USER/websec-audit.git - Create a feature branch:
git checkout -b feature/your-feature - Make your changes
- Run
shellcheck -S warning websec-audit.sh— zero warnings required - Commit using conventional commits (see below)
- Push and open a Pull Request against
main
Code style¶
- Target bash 5.0+
- Use
set -euo pipefailat the top of every script - Quote all variable expansions:
"$var"not$var - Use
[[ ]]for conditions - Declare local variables with
local varthen assign separately (avoids SC2155) - Run
shellcheckbefore every commit
Adding a new module¶
- Add a toggle:
MOD_MYMODULE=1 - Add
--skip-mymoduletoparse_args() - Write the function:
module_mymodule() {
[[ $MOD_MYMODULE -eq 0 ]] && return
log_section "MODULE XX — NAME"
# your logic
add_finding "HIGH" "MYMODULE" "Title" "Description" "evidence" "Remediation."
}
- Call it in
main()beforegenerate_reports - Add to the module table in
README.mdand these docs - Add a
CHANGELOG.mdentry
Commit conventions¶
feat(module): add GraphQL introspection detection
fix(ssl): handle certificates with no expiry date
docs(readme): add Kali installation instructions
refactor(headers): extract cookie analysis into helper
Types: feat · fix · docs · refactor · perf · test · chore
Issue templates¶
Use the GitHub issue templates:
- Bug report — for unexpected behaviour or errors
- Feature request — for new modules or improvements
Full guide¶
The complete contributing guide is in the repository: CONTRIBUTING.md