Skip to content

[IGNORE] add snyk workflow to regenerate lockfile#222

Closed
jgbernalp wants to merge 1 commit intomainfrom
add-snyk-workflow-for-lockfile
Closed

[IGNORE] add snyk workflow to regenerate lockfile#222
jgbernalp wants to merge 1 commit intomainfrom
add-snyk-workflow-for-lockfile

Conversation

@jgbernalp
Copy link
Contributor

Description

This PR creates a new GitHub workflow to allow to regenerate the lockfile when a PR is coming from a snyk branch. It amends the commit with DCO signing and the package-lock.json file changes.

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
run: |
echo "message=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT

- uses: stefanzweifel/git-auto-commit-action@v6
Copy link
Contributor

Choose a reason for hiding this comment

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

I would avoid any 3rd-party GitHub action in our CI to avoid any possible pipeline compromise.

Copy link
Contributor

Choose a reason for hiding this comment

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

(use the regular git cli, or gh)

@andreasgerstmayr
Copy link
Contributor

I'm surprised that snyk creates broken PRs, maybe it has a setting somewhere to regenerate the lockfile?

@jgbernalp
Copy link
Contributor Author

I'm surprised that snyk creates broken PRs, maybe it has a setting somewhere to regenerate the lockfile?

I was too. But it seems workspaces are not fully supported... Or we ar missing to check a checkbox: https://docs.snyk.io/supported-languages-package-managers-and-frameworks/javascript/git-repositories-and-javascript

@andreasgerstmayr
Copy link
Contributor

andreasgerstmayr commented Aug 6, 2025

Recent PRs update the lockfile now: perses/perses#3152

However, the DCO check still fails. As the snyk bot is required by CNCF, and the DCO bot also (I guess), there should be a simple solution for that (configure the DCO bot to ignore snyk commits, or configure the snyk bot to add a commit sign-off).

@jgbernalp jgbernalp marked this pull request as draft September 16, 2025 06:51
@jgbernalp jgbernalp closed this Oct 20, 2025
@jgbernalp jgbernalp deleted the add-snyk-workflow-for-lockfile branch October 20, 2025 15:55
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

Successfully merging this pull request may close these issues.

2 participants