-
Notifications
You must be signed in to change notification settings - Fork 9
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
Guide on Code Security Scanning #148
base: main
Are you sure you want to change the base?
Conversation
@ingyhere - just a note, adding labels for the type of SLIM best practice category each PR applies to (i.e. governance, software lifecycle, information sharing) helps to make future release notes more readable. See information about categories here. Also - adding the SLIM Project Board in the PR right hand menu, and tagging the status as well as the iteration helps people understand the time line for the PR. |
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.
Great progress on this! Added some comments to consider. One thing additional to note, just remember to add a registry entry so that the guide appears properly in our search. See directions here.
docs/guides/software-lifecycle/security/security-scanning/README.md
Outdated
Show resolved
Hide resolved
docs/guides/software-lifecycle/security/security-scanning/README.md
Outdated
Show resolved
Hide resolved
docs/guides/software-lifecycle/security/security-scanning/README.md
Outdated
Show resolved
Hide resolved
First cut at filling in the details on security scans
Remove TOC
docs/guides/software-lifecycle/security/security-scanning/README.md
Outdated
Show resolved
Hide resolved
docs/guides/software-lifecycle/security/security-scanning/README.md
Outdated
Show resolved
Hide resolved
pip3 install --upgrade --user nasa-scrub | ||
``` | ||
|
||
2. **Configuration** |
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.
Can we ship this guide with some working scrub.cfg
file examples the reader can just drop in and start using?
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.
I'm planning to rename it as scrub.yml
and, yes, I'll try to add some examples for scrub.cfg
.
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.
Sorry - you were thinking of renaming what to scrub.yml
?
I'll try to add some examples for
scrub.cfg
Awesome! If we can include those files not just as snippets but stand-alone files within /security-scanning
, that would allow our infusion automation to easily pick up and propose a solution via pull requests. Now that I think of it: if I wanted to say propose the recommendations you all have put down here via a pull request to a given project repository, which files would I need to propose? A scrub.cfg
and a GitHub Action workflow file? Again - having not just a snippet but a file version of the two would make infusion automation much easier to do.
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.
Sorry, to clarify,
Workflow file (example in slim-starterkit-python):
codeql.yml
-> scrub.yml
The config file would be the same name...
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.
Got it @ingyhere - that makes sense!
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.
Done, not resolved yet. Needs a little more testing.
docs/guides/software-lifecycle/security/security-scanning/README.md
Outdated
Show resolved
Hide resolved
docs/guides/software-lifecycle/security/security-scanning/README.md
Outdated
Show resolved
Hide resolved
docs/guides/software-lifecycle/security/security-scanning/README.md
Outdated
Show resolved
Hide resolved
matrix: | ||
# CodeQL supports ['cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby'] | ||
# Learn more about CodeQL language support at https://git.io/codeql-language-support | ||
language: ['python'] |
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.
This is more of a question: what happens if I enable all languages? Does CodeQL get confused or is it smart enough to ignore the irrelevant languages? If the latter - can we just list all languages by default so readers don't need to change anything?
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.
In most cases it should automatically build correctly. But there is an additional step that can be implemented (see comments) to manually build. This is a bit more involved, see this.
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.
After re-reviewing, the comments, ordering and documentation here need a bit of work.
docs/guides/software-lifecycle/security/security-scanning/README.md
Outdated
Show resolved
Hide resolved
Done |
@jpl-jengelke, |
docs/guides/software-lifecycle/security/security-scanning/README.md
Outdated
Show resolved
Hide resolved
docs/guides/software-lifecycle/security/security-scanning/README.md
Outdated
Show resolved
Hide resolved
docs/guides/software-lifecycle/security/security-scanning/README.md
Outdated
Show resolved
Hide resolved
docs/guides/software-lifecycle/security/security-scanning/README.md
Outdated
Show resolved
Hide resolved
docs/guides/software-lifecycle/security/security-scanning/README.md
Outdated
Show resolved
Hide resolved
docs/guides/software-lifecycle/security/security-scanning/README.md
Outdated
Show resolved
Hide resolved
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.
Superbly written guide with a great cadence and feel as well as utility. Should make SCRUB a much easier pill to swallow. Bravo! 🎉
Unfortunately as things go ... I see some areas for improvement. But I will make changes and ask for re-review. |
…r indentation, add registry entry. More to come ...
… there will be a semi-minor rewrite to clarify build requirements in the context of multiple languages. ...
It would be helpful to get an example of how to use sonarCloud and sonarQube in the action to align with updated guidance from NASA MGSS. Some of this work my already have been performed by Elyssa but it would be good to have it documented here as well. |
Just to clarify - @jl-0 you're talking about the Enterprise versions for each? Not the community open source license ones? e.g. https://www.sonarsource.com/plans-and-pricing/ |
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
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.
Need @lylebarner input on Autobuild scripting here.
@nutjob4life I'll contact you shortly to get clarification on the comments. Thanks. |
Purpose
Proposed Changes
Issues
Testing