-
Notifications
You must be signed in to change notification settings - Fork 61
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
support cert c optional rule help generation #880
Open
MichaelRFairhurst
wants to merge
7
commits into
main
Choose a base branch
from
michaelrfairhurst/support-cert-c-optional-rule-help
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+80
−38
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
35cfb0f
Add additional CERT-C rules to rules.csv
MichaelRFairhurst 3152769
Update obligation level of new CERT-C rules
MichaelRFairhurst 64ad8fb
Add new query suites for CERT-C recommendations
MichaelRFairhurst ad55446
Merge remote-tracking branch 'origin/main' into michaelrfairhurt/add-…
MichaelRFairhurst 8843822
Add 'recommendation' to CERT schema
MichaelRFairhurst d39ec8d
Fix, move 'recommendation' from CERT-C++ to CERT-C in schema
MichaelRFairhurst 14bd937
Update cert-help-extraction.py to support CERT-C optional (recommenda…
MichaelRFairhurst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- description: CERT C 2016 (Default) | ||
- qlpack: codeql/cert-c-coding-standards | ||
- include: | ||
kind: | ||
- problem | ||
- path-problem | ||
- external/cert/obligation/rule | ||
- exclude: | ||
tags contain: | ||
- external/cert/default-disabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- description: CERT C 2016 (Recommendations) | ||
- qlpack: codeql/cert-c-coding-standards | ||
- include: | ||
kind: | ||
- problem | ||
- path-problem | ||
- external/cert/obligation/recommendation | ||
- exclude: | ||
tags contain: | ||
- external/cert/default-disabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,2 @@ | ||
- description: CERT C 2016 (Default) | ||
- qlpack: codeql/cert-c-coding-standards | ||
- include: | ||
kind: | ||
- problem | ||
- path-problem | ||
- exclude: | ||
tags contain: | ||
- external/cert/default-disabled | ||
- description: "DEPRECATED - CERT C 2016 - use cert-c-default.qls instead" | ||
- import: codeql-suites/cert-c-default.qls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
change_notes/2025-04-09-new-cert-c-recommendation-query-suite.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- The following query suites have been added or modified for CERT C: | ||
- A new query suite has been created `cert-c-default.qls` to avoid confusion with the CERT C++ query suites. The `cert-default.qls` suite has been deprecated, and will be removed in a future releases, and is replaced by the `cert-c-default.qls` suite. | ||
- The `cert-c-default.qls` suite has been specified as the default for the pack, and will include our most up-to-date coverage for CERT C. | ||
- One new query suite, `cert-c-recommended.qls` has been added to enable running CERT recommendations (as opposed to rules) that will be added in the future. | ||
- The default query suite, `cert-c-default.qls` has been set to exclude CERT recommendations (as opposed to rules) that will be added in the future. | ||
- The following query suites have been added or modified for CERT C++: | ||
- A new query suite has been created `cert-cpp-default.qls` to avoid confusion with the CERT C query suites. The `cert-default.qls` suite has been deprecated, and will be removed in a future releases, and is replaced by the `cert-cpp-default.qls` suite. | ||
- The `cert-cpp-default.qls` suite has been specified as the default for the pack, and will include our most up-to-date coverage for CERT C. | ||
- A new query suite has been created `cert-cpp-single-translation-unit.qls` to avoid confusion with the CERT C query suites. The `cert-single-translation-unit.qls` suite has been deprecated, and will be removed in a future releases, and is replaced by the `cert-cpp-single-translation-unit.qls` suite. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- description: CERT C++ 2016 (Default) | ||
- qlpack: codeql/cert-cpp-coding-standards | ||
- include: | ||
kind: | ||
- problem | ||
- path-problem | ||
- exclude: | ||
tags contain: | ||
- external/cert/default-disabled |
11 changes: 11 additions & 0 deletions
11
cpp/cert/src/codeql-suites/cert-cpp-single-translation-unit.qls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
- description: CERT C++ 2016 (Single Translation Unit) | ||
- qlpack: codeql/cert-cpp-coding-standards | ||
- include: | ||
kind: | ||
- problem | ||
- path-problem | ||
tags contain: | ||
- scope/single-translation-unit | ||
- exclude: | ||
tags contain: | ||
- external/cert/default-disabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,2 @@ | ||
- description: CERT C++ 2016 (Default) | ||
- qlpack: codeql/cert-cpp-coding-standards | ||
- include: | ||
kind: | ||
- problem | ||
- path-problem | ||
- exclude: | ||
tags contain: | ||
- external/cert/default-disabled | ||
- description: "DEPRECATED - CERT C++ 2016 - use cert-cpp-default.qls instead" | ||
- import: codeql-suites/cert-cpp-default.qls |
13 changes: 2 additions & 11 deletions
13
cpp/cert/src/codeql-suites/cert-single-translation-unit.qls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,2 @@ | ||
- description: CERT C++ 2016 (Single Translation Unit) | ||
- qlpack: codeql/cert-cpp-coding-standards | ||
- include: | ||
kind: | ||
- problem | ||
- path-problem | ||
tags contain: | ||
- scope/single-translation-unit | ||
- exclude: | ||
tags contain: | ||
- external/cert/default-disabled | ||
- description: "DEPRECATED - CERT C++ 2016 (Single Translation Unit) - use cert-cpp-single-translation-unit.qls instead" | ||
- import: codeql-suites/cert-cpp-single-translation-unit.qls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,7 +141,8 @@ | |
"obligation": { | ||
"type": "string", | ||
"enum": [ | ||
"rule" | ||
"rule", | ||
"recommendation" | ||
] | ||
} | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 type 'Tag' is used in the function signature without an import; add 'from bs4 import Tag' to ensure proper type checking.
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
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.
Seems incorrect, file has
from bs4.element import NavigableString, Tag