Skip to content

Commit e626813

Browse files
authored
Merge pull request #27 from cosai-oasis/docs/owasp-vs-core
docs: added owasp vs core and rule types section
2 parents 530f231 + 641edf4 commit e626813

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

docs/faq.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,26 @@ This FAQ document provides clear, concise answers to help developers seamlessly
4040
</sub>
4141
</center>
4242

43+
---
44+
45+
## Q: What is the difference between always-on rules and glob-scoped rules?
46+
47+
**A:** They are two activation types:
48+
49+
- **Always-on** rules apply to all files and provide a baseline security guardrail.
50+
- **Glob-scoped** rules apply only to files matching their language/file patterns.
4351

4452
---
53+
4554
## Q: What are the OWASP supplementary rules?
4655

47-
**A:** The `sources/owasp/` folder contains supplementary rules based on OWASP cheat sheets. These rules supplement the core security rules and can be optionally included when building from source. By default, only core rules (22 files) are included in standard builds.
56+
**A:** The `sources/owasp/` folder contains supplementary rules based on OWASP guidance that informed the original rule development. These rules are optional, not enabled by default, and are intended primarily for reference and deeper security review use cases.
57+
58+
The official release bundles package the main `sources/core/` rules. If you [build from source](getting-started.md#option-2-build-from-source) and want the OWASP supplementary set too, include it explicitly:
59+
60+
```bash
61+
uv run python src/convert_to_ide_formats.py --source core owasp
62+
```
4863

4964
---
5065

docs/getting-started.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,22 @@ cp -r dist/.github/ /path/to/your/project/
136136
cp -r dist/.agent/ /path/to/your/project/
137137
```
138138

139+
## Core vs OWASP Sources
140+
141+
Project CodeGuard has two source rule sets:
142+
143+
- `sources/core/`: Official Project CodeGuard rules. These are the main rules packaged in releases and enabled by default.
144+
- `sources/owasp/`: Supplementary rules originally derived from OWASP guidance. These are optional and are not enabled by default.
145+
146+
Use OWASP supplementary rules when you explicitly want broader coverage, such as deeper security reviews or reference-driven review workflows.
147+
148+
## Rule Types: Always-On vs Glob-Scoped
149+
150+
Project CodeGuard supports two rule activation types:
151+
152+
- **Always-on rules**: Apply to all files in the project. These rules are for baseline safeguards that should always be in context.
153+
- **Glob-scoped rules**: Apply only to matching file patterns (derived from `languages` in source frontmatter). These rules are for language- or framework-specific guidance.
154+
139155
## Keeping Rules Updated (Automated)
140156

141157
For GitHub repositories, you can automate rule updates with a workflow that runs monthly and creates PRs when new versions are available.

0 commit comments

Comments
 (0)