-
Notifications
You must be signed in to change notification settings - Fork 2
Add CONTRIBUTING guide (contributions.md) #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,117 @@ | ||||||||||||||||||||||||||||
| # Contributing to ShieldCI | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| Thanks for wanting to contribute! This file explains how to file issues, propose changes, and get your code merged. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ## Quick checklist | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - [ ] Open an issue first for non-trivial changes or new features | ||||||||||||||||||||||||||||
| - [ ] Fork the repo and create a short-lived feature branch | ||||||||||||||||||||||||||||
| - [ ] Follow the branch and commit naming conventions below | ||||||||||||||||||||||||||||
| - [ ] Add or update tests for new functionality | ||||||||||||||||||||||||||||
| - [ ] Run the linters/formatters and ensure `cargo check` passes | ||||||||||||||||||||||||||||
| - [ ] Open a pull request (PR) describing the change and linking any related issues | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ## Filing issues | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - Use issues for bugs, feature requests, and questions. | ||||||||||||||||||||||||||||
| - Provide a short title and a reproducible test case or steps to reproduce. | ||||||||||||||||||||||||||||
| - Include logs, platform (OS), and versions if relevant. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ## Branch & commit conventions | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - Branches: use `feature/<short-desc>`, `fix/<short-desc>`, or `chore/<short-desc>`. | ||||||||||||||||||||||||||||
| - Example: `feature/docker-allinone`, `fix/readme-link` | ||||||||||||||||||||||||||||
| - Commits: use imperative, present-tense messages: | ||||||||||||||||||||||||||||
| - `Add Dockerfile.allinone and docker-compose` | ||||||||||||||||||||||||||||
| - `Fix: rewrite README architecture image link` | ||||||||||||||||||||||||||||
| - Squash or tidy commits before merging if the PR history is noisy. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ## Coding style & tools | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| Rust | ||||||||||||||||||||||||||||
| - Use `rustfmt` to format Rust code: `rustup component add rustfmt && cargo fmt` | ||||||||||||||||||||||||||||
| - Run the compiler checks: `cargo check` and tests: `cargo test` | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| Node (test app) | ||||||||||||||||||||||||||||
| - Use the Node version specified in `tests/package.json` (if any) | ||||||||||||||||||||||||||||
| - Install deps: `cd tests && npm install` | ||||||||||||||||||||||||||||
| - Run the test app: `node app.js` | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| Python | ||||||||||||||||||||||||||||
| - Virtualenv recommended for running `push_results.py` or `kali_mcp.py`. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| General | ||||||||||||||||||||||||||||
| - Keep changes focused and small. One PR per logical change. | ||||||||||||||||||||||||||||
| - Add comments for non-obvious logic and update `README.md` or docs when behavior changes. | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ## Running and testing locally (recommended flow) | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| 1. Start Ollama (local LLM) and Docker Desktop. | ||||||||||||||||||||||||||||
| 2. Build the Rust binary: | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||
| cargo build --release | ||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| 3. Build the Kali image (if testing tools): | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||
| docker build -t shieldci-kali-image . | ||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| 4. Run the vulnerable test app: | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||
| cd tests | ||||||||||||||||||||||||||||
| npm install | ||||||||||||||||||||||||||||
| node app.js | ||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| 5. Run the engine from repo root (it reads `tests/shieldci.yml`): | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||
| ./target/release/shield-ci | ||||||||||||||||||||||||||||
| # or during dev | ||||||||||||||||||||||||||||
| cargo run --release --manifest-path Cargo.toml | ||||||||||||||||||||||||||||
|
Comment on lines
+70
to
+75
|
||||||||||||||||||||||||||||
| 5. Run the engine from repo root (it reads `tests/shieldci.yml`): | |
| ```bash | |
| ./target/release/shield-ci | |
| # or during dev | |
| cargo run --release --manifest-path Cargo.toml | |
| 5. Run the engine from the `tests` directory (it reads `shieldci.yml` from the current working directory): | |
| ```bash | |
| cd tests | |
| ../target/release/shield-ci | |
| # or during dev | |
| cargo run --release --manifest-path ../Cargo.toml |
Copilot
AI
Mar 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The working directory in steps 4–6 is inconsistent with where the engine writes shield_results.json (it writes to the current directory). If contributors run the engine from tests/ (needed to pick up tests/shieldci.yml), push_results.py should either be run with SHIELDCI_RESULTS_FILE=tests/shield_results.json (or ../tests/shield_results.json depending on cwd) or from the same directory where the results file was generated; otherwise push_results.py will look for shield_results.json in the wrong place by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub only auto-detects contribution guidelines when the file is named
CONTRIBUTING.md(or placed under.github//docs/with that name). With the currentcontributions.mdfilename, GitHub won’t surface it on the repo/PR UI; consider renaming toCONTRIBUTING.md(and updating any references accordingly).