Skip to content

Commit 52489c7

Browse files
author
Ramraj Bishnoie
committed
fix: updated safe-c-function rule to apply to c/cpp languages only
1 parent 0de20e1 commit 52489c7

8 files changed

Lines changed: 18 additions & 15 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"name": "codeguard-security",
1414
"source": "./",
1515
"description": "Comprehensive security rules for AI coding agents",
16-
"version": "1.0.0",
16+
"version": "1.0.1",
1717
"repository": "https://github.com/project-codeguard/rules.git",
1818
"tags": [
1919
"security",

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "codeguard-security",
33
"description": "Security code review skill based on Project CodeGuard's comprehensive security rules. Helps AI coding agents write secure code and prevent common vulnerabilities.",
4-
"version": "1.0.0",
4+
"version": "1.0.1",
55
"author": {
66
"name": "Project CodeGuard",
77
"url": "https://project-codeguard.org"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "project-codeguard"
3-
version = "1.0.0"
3+
version = "1.0.1"
44
description = "AI Coding Rules for Security and Best Practices"
55
requires-python = ">=3.11"
66
dependencies = [

skills/software-security/SKILL.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
name: software-security
33
description: A software security skill that integrates with Project CodeGuard to help AI coding agents write secure code and prevent common vulnerabilities. Use this skill when writing, reviewing, or modifying code to ensure secure-by-default practices are followed.
4-
metadata:
5-
codeguard-version: "1.0.0"
4+
codeguard-version: "1.0.1"
65
framework: "Project CodeGuard"
76
purpose: "Embed secure-by-default practices into AI coding workflows"
87
---
@@ -25,13 +24,13 @@ When writing or reviewing code:
2524
- `codeguard-1-hardcoded-credentials.md` - Never hardcode secrets, passwords, API keys, or tokens
2625
- `codeguard-1-crypto-algorithms.md` - Use only modern, secure cryptographic algorithms
2726
- `codeguard-1-digital-certificates.md` - Validate and manage digital certificates securely
28-
- `codeguard-1-safe-c-functions.md` - Avoid unsafe C/C++ functions and use safe alternatives
2927
2. Context-Specific Rules: Apply rules from /rules directory based on the language of the feature being implemented using the table given below:
3028

3129

3230
| Language | Rule Files to Apply |
3331
|----------|---------------------|
34-
| c | codeguard-0-additional-cryptography.md, codeguard-0-api-web-services.md, codeguard-0-authentication-mfa.md, codeguard-0-authorization-access-control.md, codeguard-0-client-side-web-security.md, codeguard-0-data-storage.md, codeguard-0-file-handling-and-uploads.md, codeguard-0-framework-and-languages.md, codeguard-0-iac-security.md, codeguard-0-input-validation-injection.md, codeguard-0-logging.md, codeguard-0-session-management-and-cookies.md, codeguard-0-xml-and-serialization.md |
32+
| c | codeguard-0-additional-cryptography.md, codeguard-0-api-web-services.md, codeguard-0-authentication-mfa.md, codeguard-0-authorization-access-control.md, codeguard-0-client-side-web-security.md, codeguard-0-data-storage.md, codeguard-0-file-handling-and-uploads.md, codeguard-0-framework-and-languages.md, codeguard-0-iac-security.md, codeguard-0-input-validation-injection.md, codeguard-0-logging.md, codeguard-0-safe-c-functions.md, codeguard-0-session-management-and-cookies.md, codeguard-0-xml-and-serialization.md |
33+
| cpp | codeguard-0-safe-c-functions.md |
3534
| d | codeguard-0-iac-security.md |
3635
| docker | codeguard-0-devops-ci-cd-containers.md, codeguard-0-supply-chain-security.md |
3736
| go | codeguard-0-additional-cryptography.md, codeguard-0-api-web-services.md, codeguard-0-authentication-mfa.md, codeguard-0-authorization-access-control.md, codeguard-0-file-handling-and-uploads.md, codeguard-0-input-validation-injection.md, codeguard-0-session-management-and-cookies.md, codeguard-0-xml-and-serialization.md |

skills/software-security/rules/codeguard-1-safe-c-functions.md renamed to skills/software-security/rules/codeguard-0-safe-c-functions.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
---
22
description: Safe C Functions and Memory and String Safety Guidelines
3-
alwaysApply: true
3+
languages:
4+
- c
5+
- cpp
6+
alwaysApply: false
47
---
58

6-
rule_id: codeguard-1-safe-c-functions
9+
rule_id: codeguard-0-safe-c-functions
710

811
# Prioritize Safe Memory and String Functions in C/C++
912

sources/core/codeguard-1-safe-c-functions.md renamed to sources/core/codeguard-0-safe-c-functions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
description: Safe C Functions and Memory and String Safety Guidelines
3-
languages: []
4-
alwaysApply: true
3+
languages:
4+
- c
5+
- cpp
6+
alwaysApply: false
57
---
68

79
# Prioritize Safe Memory and String Functions in C/C++

sources/core/codeguard-SKILLS.md.template

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
name: software-security
33
description: A software security skill that integrates with Project CodeGuard to help AI coding agents write secure code and prevent common vulnerabilities. Use this skill when writing, reviewing, or modifying code to ensure secure-by-default practices are followed.
4-
metadata:
5-
codeguard-version: "1.0.0"
4+
codeguard-version: "x.x.x"
65
framework: "Project CodeGuard"
76
purpose: "Embed secure-by-default practices into AI coding workflows"
87
---

uv.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)