You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude-plugin/plugin.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"name": "codeguard-security",
3
3
"description": "Security code review skill based on Project CodeGuard's comprehensive security rules. Helps AI coding agents write secure code and prevent common vulnerabilities.",
Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/new-rule.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ body:
6
6
- type: markdown
7
7
attributes:
8
8
value: |
9
-
Thank you for your new rule request! Please provide as much detail as possible. Use any of the existing rules as a reference. You only have to provide the rule contents (markdown), not the rule metadata. We will handle the rest. In other words, convert your rule into all the formats (Cursor, Windsurf, Copilot).
9
+
Thank you for your new rule request! Please provide as much detail as possible. Use any of the existing rules as a reference. You only have to provide the rule contents (markdown), not the rule metadata. We will handle the rest. In other words, convert your rule into all the formats (Cursor, Windsurf, Copilot, Antigravity).
Copy file name to clipboardExpand all lines: README.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,12 @@ This project is an AI model-agnostic security framework and ruleset (internally
10
10
11
11
AI coding agents are transforming software engineering, but this speed can introduce security vulnerabilities. Is your AI coding agent implementation introducing security vulnerabilities?
12
12
13
-
-❌ Skipping input validation
14
-
-❌ Hardcoding secrets and credentials
15
-
-❌ Using weak cryptographic algorithms
16
-
-❌ Relying on unsafe functions
17
-
-❌ Missing authentication/authorization checks
18
-
-❌ Missing any other security best practice
13
+
- Skipping input validation
14
+
- Hardcoding secrets and credentials
15
+
- Using weak cryptographic algorithms
16
+
- Relying on unsafe functions
17
+
- Missing authentication/authorization checks
18
+
- Missing any other security best practice
19
19
20
20
Project CodeGuard solves this by embedding security best practices directly into AI coding agent workflows.
21
21
@@ -31,14 +31,14 @@ Project CodeGuard is designed to integrate seamlessly across the entire AI codin
These rules apply based on the programming language, framework, or feature being implemented. Claude automatically selects relevant rules based on context:
172
170
@@ -182,6 +180,7 @@ These rules apply based on the programming language, framework, or feature being
> **Note:** Each rule file contains detailed guidance, checklists, and examples. Claude references these automatically based on the code context.
187
186
@@ -291,7 +290,7 @@ uv run python src/convert_to_ide_formats.py
291
290
This command:
292
291
- Converts unified rules from `sources/` to IDE-specific formats
293
292
- Generates `skills/` directory with the 22 core security rules (Claude Code plugin)
294
-
- Creates `dist/` with IDE-specific formats (Cursor, Windsurf, Copilot)
293
+
- Creates `dist/` with IDE-specific formats (Cursor, Windsurf, Copilot, Antigravity)
295
294
296
295
**Note:** The Claude Code plugin (`skills/`) always contains only the 22 curated core rules. To build bundles with OWASP supplementary rules for other IDEs, use `--source core owasp`, but this only affects `dist/`, not `skills/`.
297
296
@@ -385,6 +384,11 @@ Found an issue with the plugin or want to improve it?
385
384
386
385
## Version History
387
386
387
+
### Version 1.0.1
388
+
- Changed `codeguard-1-safe-c-functions` from always-apply to `codeguard-0-safe-c-functions` context-specific rule (C/C++ only)
Copy file name to clipboardExpand all lines: docs/faq.md
+31-18Lines changed: 31 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,20 @@ This FAQ document provides clear, concise answers to help developers seamlessly
26
26
---
27
27
## Q: Will these rules consume a lot of the AI agent's **context window**?
28
28
29
-
**A:** No. The always-on rules are designed to be lightweight and efficient, and should not consume a lot of the AI agent's context window. The "glob" rules are designed to be applied only to the related file types specified in the rule.
29
+
**A:** The always‑on rules are lightweight and have minimal impact on the AI agent’s context window. Glob‑scoped rules only apply to their matching file types. Below are Cursor examples: left, no rules; right, three always‑on rules enabled.
30
+
31
+
<palign="center">
32
+
<imgsrc="../images/context-window-no-rules.png"alt="Cursor AI agent context window usage without Project CodeGuard rules"width="40%"style="display:inline-block; margin-right:2%;" />
33
+
<imgsrc="../images/context-window-with-rules.png"alt="Cursor AI agent context window usage with Project CodeGuard rules enabled"width="40%"style="display:inline-block;" />
34
+
</p>
35
+
36
+
<center>
37
+
<sub>
38
+
<b>Left:</b> Context window usage without any rules in place.<br>
39
+
<b>Right:</b> Context window usage with three always-on rules enabled.
40
+
</sub>
41
+
</center>
42
+
30
43
31
44
---
32
45
## Q: What are the OWASP supplementary rules?
@@ -37,19 +50,19 @@ This FAQ document provides clear, concise answers to help developers seamlessly
37
50
38
51
## Q: How can I use the rules in my own AI agent?
39
52
40
-
**A:** You can use the rules in your own AI agent by creating a custom ruleset. You can create a custom ruleset by creating a new file in the `.cursor/rules`, `.windsurf/rules`, or `.github/instructions` directories and adding the rules you want to apply. You can also use the `project-codeguard/rules` repository as a template to create your own ruleset.
53
+
**A:** You can use the rules in your own AI agent by creating a custom ruleset. You can create a custom ruleset by creating a new file in the `.cursor/rules`, `.windsurf/rules`, `.github/instructions`, or `.agent/rules` directories and adding the rules you want to apply. You can also use the `project-codeguard/rules` repository as a template to create your own ruleset.
41
54
42
55
---
43
56
44
57
## Q: Why does the downloaded release folder appear empty?
45
58
46
-
**A:** After downloading and extracting the release, the folders may appear empty because the rule directories (`.cursor/`, `.windsurf/`, `.github/`) start with a dot (`.`) and are hidden by default on most operating systems.
59
+
**A:** After downloading and extracting the release, the folders may appear empty because the rule directories (`.cursor/`, `.windsurf/`, `.github/`, `.agent/`) start with a dot (`.`) and are hidden by default on most operating systems.
47
60
48
61
**To show hidden files:**
49
62
50
63
=== "macOS"
51
64
52
-
In Finder, navigate to the extracted folder and press ++cmd+shift+period++ to toggle the visibility of hidden files. You should now see the `.cursor/`, `.windsurf/`, and `.github/` directories.
65
+
In Finder, navigate to the extracted folder and press ++cmd+shift+period++ to toggle the visibility of hidden files. You should now see the `.cursor/`, `.windsurf/`, `.github/`, and `.agent/` directories.
53
66
54
67
=== "Windows"
55
68
@@ -63,15 +76,20 @@ This FAQ document provides clear, concise answers to help developers seamlessly
63
76
64
77
In your file manager, press ++ctrl+h++ to toggle hidden files, or use `ls -la` in the terminal to view all files including hidden ones.
65
78
66
-
Once hidden files are visible, you can copy the appropriate directory (`.cursor/`, `.windsurf/`, or `.github/`) to your project root.
79
+
Once hidden files are visible, you can copy the appropriate directory (`.cursor/`, `.windsurf/`, `.github/`, or `.agent/`) to your project root.
67
80
68
81
---
69
82
70
83
## Q: Can I use this with Claude Code?
71
84
72
-
**A:** Yes! Claude Code automatically reads and follows instructions from a `CLAUDE.md` file in your project root. To use Project CodeGuard rules with Claude Code you can point to the Project CodeGuard rules in your `CLAUDE.md` file.
85
+
**A:** Yes! Install the Project CodeGuard Claude Code plugin (Agent Skill) and Claude will apply the security rules automatically while you code.
When Claude Code operates in your project, it treats the Project CodeGuard security rules in `CLAUDE.md` as authoritative system instructions.
92
+
For team/repo defaults, add the plugin in `.claude/settings.json` so it’s enabled for all contributors. See the [Claude Code Plugin documentation](claude-code-skill-plugin.md) for details and troubleshooting.
75
93
76
94
77
95
## Q: How can I report a problem or enhancement to any of the rules?
@@ -86,17 +104,6 @@ We welcome all feedback - whether it's a bug report, success story, or enhanceme
86
104
87
105
---
88
106
89
-
## Q: Why do I get the following error message in GitHub for some of the rules?
90
-
91
-
```
92
-
Error in user YAML: (<unknown>): did not find expected alphabetic
93
-
or numeric character while scanning an alias at line x column x
94
-
```
95
-
96
-
**A:** You can safely ignore this error. GitHub attempts to parse YAML headers combined with markdown content, which can cause this warning. It does not affect rule functionality - the rules will work correctly in your IDE regardless of this GitHub display issue.
97
-
98
-
---
99
-
100
107
## Q: How can I contribute to these rules and this project?
101
108
102
109
**A:** You can contribute at any time by:
@@ -110,6 +117,12 @@ See [CONTRIBUTING.md](https://github.com/project-codeguard/rules/blob/main/CONTR
110
117
111
118
---
112
119
120
+
## Q: Does Project CodeGuard replace my security scanners?
121
+
122
+
**A:** No, Project CodeGuard rules do not replace your security scanners. The primary purpose of CodeGuard is to help you avoid introducing new security vulnerabilities as you write code, by providing agentic rules and guidance directly in your IDE. If you perform a code review using these rules, Project CodeGuard will most likely identify many of the same vulnerabilities that security scanning tools would find. However, CodeGuard is not a comprehensive substitute for security scanners—automated security tools are designed to thoroughly analyze your entire codebase and catch a broader range of issues. For best results, use CodeGuard rules in combination with your existing security scanners to maximize your code’s security.
0 commit comments