惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
H
Help Net Security
V
Visual Studio Blog
G
Google Developers Blog
Blog — PlanetScale
Blog — PlanetScale
Last Week in AI
Last Week in AI
C
Check Point Blog
D
Docker
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
博客园 - 叶小钗
博客园 - 聂微东
The Cloudflare Blog
云风的 BLOG
云风的 BLOG
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
MyScale Blog
MyScale Blog
WordPress大学
WordPress大学
Engineering at Meta
Engineering at Meta
腾讯CDC
S
SegmentFault 最新的问题
博客园 - 【当耐特】

Danb Blog

August 2026: What I've Been Working On · Danb Blog Great Tech: Intel 2500k CPU · Danb Blog July 2026: What I've Been Working On · Danb Blog My Experience with Ubuntu Desktop 26.04 · Danb Blog Thumbnails for Orca 3MF in GNOME Files · Danb Blog Cheaper Sodastream Gas with a Big Tank · Danb Blog June 2026: What I've Been Working On · Danb Blog Tuta & Proton: An Open Source Client Does Not Result in an Open Source Service · Danb Blog May 2026: What I've Been Working On · Danb Blog 3D Printing Parts for my Greenhouse, Round 2 · Danb Blog Great Devices: Nexus 7 2013 · Danb Blog R36S Console RetroArch Stuck Menu Issue · Danb Blog April 2026: What I've Been Working On · Danb Blog Basic OpenCode Sandboxing with Docker · Danb Blog Games Played in 2025 · Danb Blog March 2026: What I've Been Working On · Danb Blog Shivam Mathur's "node-docker" Images are Awesome for PHP CI · Danb Blog February 2026: What I've Been Working On · Danb Blog Your BookStackApp project was assigned as a project for my Software Architecture course · Danb Blog My Sovol SV08 3D Printer Setup in 2026 · Danb Blog January 2026: What I've Been Working On · Danb Blog Epson Printer: The administrator password you entered was not recognized · Danb Blog Pressure to Follow Process · Danb Blog Online Shopping Email Notifications · Danb Blog My HomeLab Setup in 2026 · Danb Blog Linux Label Printing with the Phomemo D30 · Danb Blog Reporting to the CMA: Google Android Developer Verification · Danb Blog OPNsense & Dnsmasq: Responding with specific DNS servers · Danb Blog An Impromptu Introduction to ZFS Drive Replacement at 1am · Danb Blog Experience with UK Medical Cannabis for Ankylosing Spondylitis · Danb Blog
Running Snyk On Forgejo/Codeberg Actions · Danb Blog
2026-06-25 · via Danb Blog

Recently I started using Snyk to keep an eye on project dependencies, and I wanted to automate the process of updating the project in Snyk with the latest package lists.

I came up with the below, so I thought I’d share it to help others attempting to achieve the same.

This version specifically targets both composer.lock and package-lock.json files for PHP/Composer packages & NPM-based packages, and it runs for changes to these on development and release branches. When run, it will update projects in Snyk to be monitored, using a name of bookstack-{branch_name}-{npm|composer}, so that different branches can be monitored independently.

You’ll need to add a token from Snyk as a SNYK_TOKEN secret in the Codeberg/Forgejo project/owner settings.

name: update-snyk

on:
  workflow_dispatch:
  push:
    paths:
      - 'composer*'
      - 'package*'
    branches:
      - 'development'
      - 'release'

jobs:
  update:
    runs-on: docker
    container:
      image: docker.io/library/node:24-trixie
    steps:
    - uses: https://code.forgejo.org/actions/checkout@v6

    - name: Update Snyk for monitoring - Composer
      uses: https://github.com/snyk/actions/node@master
      env:
        SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
      with:
        args: snyk monitor --file=composer.lock --project-name=bookstack-${{forgejo.ref_name}}-composer

    - name: Update Snyk for monitoring - NPM
      uses: https://github.com/snyk/actions/node@master
      env:
        SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
      with:
        args: snyk monitor --file=package-lock.json --project-name=bookstack-${{forgejo.ref_name}}-npm