-
Notifications
You must be signed in to change notification settings - Fork 1.9k
PSScriptanalyzer rules port #19343
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
PSScriptanalyzer rules port #19343
Conversation
… and misc. crypto example files
…er-shared-changes Powershell: Fix dataflow library after GitHub changes
Compatible with the latest released version of the CodeQL CLI
…ition Brodes/open source query transition
…ifications to the shared dataflow library files.
Shared: Refactor `DataFlowStack`
Java/C#: Add missing files from #157
Java: Update file that was forgotten in #157
PS: Handle more flow sources
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.
Pull Request Overview
This PR ports several PSScriptanalyzer rules and updates related example code, documentation, and workflow automation for the CodeQL repository.
- Adds a new example in C for conditional leap year logic.
- Updates change notes with a new class for additional call targets.
- Introduces and enhances GitHub workflows along with security and README updates.
Reviewed Changes
Copilot reviewed 1850 out of 1862 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| cpp/ql/src/Likely Bugs/Leap Year/examples/LeapYearConditionalLogicBad.c | Adds example code demonstrating leap year logic with branch comments. |
| cpp/ql/lib/change-notes/2023-10-12-additional-call-targets.md | Documenting the addition of the AdditionalCallTarget class. |
| SECURITY.md | Includes updated security guidelines and instructions. |
| README.md | Minor updates to spacing in tasks section. |
| .github/workflows/sync-main.yml | New workflow for syncing the main branch with upstream changes. |
| .github/workflows/powershell-pr-check.yml | New PowerShell PR check workflow for the repository. |
Files not reviewed (12)
- cpp/ql/lib/experimental/cryptography/utils/OpenSSL/CryptoFunction.qll: Language not supported
- cpp/ql/lib/semmle/code/cpp/models/implementations/Iterator.qll: Language not supported
- cpp/ql/src/Likely Bugs/Leap Year/Adding365DaysPerYear.ql: Language not supported
- cpp/ql/src/Likely Bugs/Leap Year/AntiPattern5InvalidLeapYearCheck.ql: Language not supported
- cpp/ql/src/Likely Bugs/Leap Year/LeapYearConditionalLogic.qhelp: Language not supported
- cpp/ql/src/Likely Bugs/Leap Year/LeapYearConditionalLogic.ql: Language not supported
- cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.qhelp: Language not supported
- cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql: Language not supported
- cpp/ql/src/Likely Bugs/Leap Year/UncheckedReturnValueForTimeFunctions.qhelp: Language not supported
- cpp/ql/src/Likely Bugs/Leap Year/UncheckedReturnValueForTimeFunctions.ql: Language not supported
- cpp/ql/src/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear.qhelp: Language not supported
- cpp/ql/src/Likely Bugs/Leap Year/UnsafeArrayForDaysOfYear.ql: Language not supported
Comments suppressed due to low confidence (2)
cpp/ql/src/Likely Bugs/Leap Year/examples/LeapYearConditionalLogicBad.c:5
- Consider adding tests that cover the 'isLeapYear' true branch to ensure the untested path is validated.
// untested path
cpp/ql/src/Likely Bugs/Leap Year/examples/LeapYearConditionalLogicBad.c:16
- Add tests to cover the leap day detection branch to ensure complete testing of the conditional logic.
// untested path
Porting the following:
AvoidUsingComputerNameHardcoded
AvoidUsingConvertToSecureStringWithPlainText
AvoidUsingUsernameAndPasswordParams
ReservedCmdletChar