Skip to content
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

Improve score on OpenSSF scorecard #450

Closed
mhdawson opened this issue Apr 13, 2023 · 8 comments
Closed

Improve score on OpenSSF scorecard #450

mhdawson opened this issue Apr 13, 2023 · 8 comments
Milestone

Comments

@mhdawson
Copy link
Member

https://deps.dev/project/github/nodejs%2Fnode-addon-api
https://deps.dev/project/github/nodejs%2Fnode-addon-examples

@mhdawson
Copy link
Member Author

  • Kevin mentioned branch protection in the last meeting.

@KevinEady
Copy link
Contributor

KevinEady commented Jul 5, 2023

node-addon-api (scorecard)

node-addon-examples (scorecard)

  • Add branch protection on main
  • Add LICENSE file
  • Make code reviews mandatory (as well as for administrators)
  • Make GitHub Actions CI workflow tokens read-only
  • Add CodeQL scanning similar to node-addon-api...?
  • Add fuzzing...?

@mhdawson
Copy link
Member Author

Add branch protection for both node-addon-api and node-addon-examples.

@mhdawson
Copy link
Member Author

PR to add boilerplate files to node-addon-examples - nodejs/node-addon-examples#213

@mhdawson
Copy link
Member Author

@KevinEady can you expand a bit on Make GitHub Actions CI workflow tokens read-only

@mhdawson
Copy link
Member Author

PR to add best practices to node-addon-api - nodejs/node-addon-examples#214

@KevinEady
Copy link
Contributor

Hi @mhdawson,

... can you expand a bit on Make GitHub Actions CI workflow tokens read-only

From Assigning permissions to jobs - GitHub Docs:

You can use permissions to modify the default permissions granted to the GITHUB_TOKEN, adding or removing access as required, so that you only allow the minimum required access.

This is for the principle of least privilege, as discussed in the Token-Permissions Check documentation.

This was mostly addressed by the SecurityBot PR nodejs/node-addon-examples#214 , eg: nodejs/node-addon-examples@a05f82c#diff-e98936aa52a6dd7416e4296e9628456227d834f7245967383fd9ff80fd985dadR9-R11 but it skipped a workflow that I added to the PR in this commit.

So once this PR is merged, we can say that the Token-Permissions issue has been addressed and we will receive full points.

@mhdawson
Copy link
Member Author

@KevinEady I think I merged the PR you mentioned, so we should be able to close this now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants