Skip to content

Fix #251, Implement Coding Standard Rules in CodeQL#254

Merged
astrogeco merged 1 commit intonasa:integration-candidatefrom
ArielSAdamsNASA:fix-251-jpl-rules-codeql
May 20, 2021
Merged

Fix #251, Implement Coding Standard Rules in CodeQL#254
astrogeco merged 1 commit intonasa:integration-candidatefrom
ArielSAdamsNASA:fix-251-jpl-rules-codeql

Conversation

@ArielSAdamsNASA
Copy link
Contributor

@ArielSAdamsNASA ArielSAdamsNASA commented May 6, 2021

Checklist (Please check before submitting)

Describe the contribution
Fix #251
Added JPL rules to configuration guide to follow the coding standard. CodeQL provides some MISRA rules scattered in its repository.

  • cpp/ql/src/jsf/4.21 Operators/AV Rule 165.ql - MISRA Rule 5-3-2
  • cpp/ql/src/jsf/4.22 Pointers and References/AV Rule 173.ql - MISRA Rule 7-5-2
  • cpp/ql/src/jsf/4.21 Operators/AV Rule 157.ql - MISRA Rule 5-14-1
  • cpp/ql/src/jsf/4.21 Operators/AV Rule 168.ql - MISRA Rule 5-18-1
  • cpp/ql/src/jsf/4.25 Expressions/AV Rule 202.ql - MISRA 6-2-2
  • cpp/ql/src/jsf/4.20 Unions and Bit Fields/AV Rule 153.ql - MISRA Rule 9-5-1

Testing performed
Tested locally. JPL rules can be seen here:
image

Expected behavior changes
CodeQL should scan for violations against JPL rules and a few MISRA rules.

Additional context
Can create a separate workflows. One for the coding standards and another for the security queries.

Note that users can search through results based on rules, but I believe this can be done one rule at a time.

Contributor Info - All information REQUIRED for consideration of pull request
Ariel Adams, ASRC Federal

@ArielSAdamsNASA ArielSAdamsNASA marked this pull request as draft May 6, 2021 19:52
@ArielSAdamsNASA ArielSAdamsNASA changed the title Fix #251, Add JPL Rules to CodeQL Fix #251, Implement Coding Standard Rules to CodeQL May 6, 2021
@ArielSAdamsNASA ArielSAdamsNASA changed the title Fix #251, Implement Coding Standard Rules to CodeQL Fix #251, Implement Coding Standard Rules in CodeQL May 6, 2021
@ArielSAdamsNASA ArielSAdamsNASA marked this pull request as ready for review May 6, 2021 21:27
@ArielSAdamsNASA ArielSAdamsNASA requested a review from astrogeco May 6, 2021 21:27
@ArielSAdamsNASA ArielSAdamsNASA added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label May 7, 2021
@astrogeco
Copy link
Contributor

Instead of a whole new workflow, you could do multiple jobs that use different config files

@astrogeco astrogeco added CCB:Approved Indicates code review and approval by community CCB and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels May 12, 2021
@ArielSAdamsNASA
Copy link
Contributor Author

Instead of a whole new workflow, you could do multiple jobs that use different config files

@astrogeco The JPL and MISRA rules are added in the already existing configuration. There is no new workflow, just the codeql-build.yml workflow. Do you want me to add another configuration file and separate jobs, one for coding standard and one for security, in that one workflow?

@astrogeco
Copy link
Contributor

Do you want me to add another configuration file and separate jobs, one for coding standard and one for security, in that one workflow?

I think that makes sense!

@astrogeco astrogeco changed the base branch from main to integration-candidate May 19, 2021 20:05
@astrogeco astrogeco force-pushed the integration-candidate branch from da34c28 to cbd1fe2 Compare May 19, 2021 20:28
@astrogeco astrogeco merged commit 1c2fa91 into nasa:integration-candidate May 20, 2021
chillfig pushed a commit to chillfig/cFS that referenced this pull request Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CCB:Approved Indicates code review and approval by community CCB continuous-integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement JPL Rules in CodeQL

3 participants