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

[StepSecurity] Apply security best practices #57535

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

step-security-bot
Copy link

Summary

This pull request is created by StepSecurity at the request of @RafaelGSS. Please merge the Pull Request to incorporate the requested changes. Please tag @RafaelGSS on your message if you have any questions related to the PR.

Security Fixes

Detect Vulnerabilities with SAST Workflow

Static Code Analysis (also known as Source Code Analysis) is usually performed as part of a Code Review (also known as clear-box testing) and is carried out at the Implementation phase of a Security Development Lifecycle (SDL). Static Code Analysis commonly refers to the running of Static Code Analysis tools that attempt to highlight possible vulnerabilities within ‘static’ (non-running) source code by using techniques such as Taint Analysis and Data Flow Analysis.

Add Dependency Review Workflow

The Dependency Review Workflow enforces dependency reviews on your pull requests. The action scans for vulnerable versions of dependencies introduced by package version changes in pull requests, and warns you about the associated security vulnerabilities. This gives you better visibility of what's changing in a pull request, and helps prevent vulnerabilities being added to your repository.

Feedback

For bug reports, feature requests, and general feedback; please email [email protected]. To create such PRs, please visit https://app.stepsecurity.io/securerepo.

Signed-off-by: StepSecurity Bot [email protected]

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/actions

@nodejs-github-bot nodejs-github-bot added the meta Issues and PRs related to the general management of the project. label Mar 18, 2025
Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in the last security meeting, LGTM.

Waiting for @nodejs/security-wg feedback before landing it.

@RafaelGSS RafaelGSS added security Issues and PRs related to security. security-wg-agenda blocked PRs that are blocked by other issues or PRs. labels Mar 18, 2025
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@targos
Copy link
Member

targos commented Mar 18, 2025

The run generates a warning:

1 issue was detected with this workflow: CodeQL language 'javascript' is referenced by more than one entry in the 'language' matrix parameter for job 'analyze'. This may result in duplicate alerts. Please edit the 'language' matrix parameter to keep only one of the following: 'javascript', 'typescript'.

Copy link
Member

@targos targos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking because I don't want us to introduce a mandatory workflow that takes more than one hour on every PR.

@RafaelGSS
Copy link
Member

RafaelGSS commented Mar 18, 2025

Blocking because I don't want us to introduce a mandatory workflow that takes more than one hour on every PR.

Do you mean the dependency-review? Just want to make sure I understand to discuss this in the next security-wg meeting.

@targos
Copy link
Member

targos commented Mar 18, 2025

No, I mean the CodeQL (cpp). It's still running here after 1h32min: https://github.com/nodejs/node/actions/runs/13927045256/job/38974215974?pr=57535

@RafaelGSS
Copy link
Member

RafaelGSS commented Mar 27, 2025

@targos We discussed it in today's security-wg meeting, and a feasible option would be changing this workflow to run on a nightly (once per day) basis and not blocking any PR until we have trust in this workflow run. The security team can take action to review the runs and make sure things are working as expected.

How does it sound to you?

@metcoder95
Copy link
Member

metcoder95 commented Mar 27, 2025

@targos We discussed it in today's security-wg meeting, and a feasible option would be changing this workflow to run on a nightly (once per day) basis and not blocking any PR until we have trust in this workflow run. The security team can take action to review the runs and make sure things are working as expected.

As part of this split effort, is there an option to consider the possibility of splitting the c++ workflow, so we can use the manual build mode to build cache around and maybe speed up things? (if we see value on keeping the workflow).

Ref: https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages

@targos
Copy link
Member

targos commented Mar 27, 2025

Sounds good to me. My concern is about avoiding friction for regular pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked PRs that are blocked by other issues or PRs. meta Issues and PRs related to the general management of the project. security Issues and PRs related to security. security-wg-agenda
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants