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

推荐订阅源

博客园 - 司徒正美
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
罗磊的独立博客
The GitHub Blog
The GitHub Blog
L
LangChain Blog
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
DataBreaches.Net
宝玉的分享
宝玉的分享
U
Unit 42
阮一峰的网络日志
阮一峰的网络日志
Last Week in AI
Last Week in AI
N
Netflix TechBlog - Medium
The Cloudflare Blog
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security
美团技术团队
大猫的无限游戏
大猫的无限游戏
雷峰网
雷峰网
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | Blog

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