Skip to content

Instantly share code, notes, and snippets.

# Example Snyk script for GitLab CI/CD Pipeline with Node.js project
dependency_scanning:
image: node:latest
stage: test
script:
# Install npm, snyk, and snyk-to-html
- npm install -g npm@latest
- npm install -g snyk
- npm install snyk-to-html -g
# Run snyk help, snyk auth, snyk monitor, snyk test to break build and out report
addEventListener("fetch", event => {
event.respondWith(handleRequest(event.request))
})
async function subRequest(url) {
const init = {
method: 'GET',
headers: {
'user-agent': 'Cloudflare Edge-Side-Includes parser (Curated by Cloudflare Workers)'
}