Skip to content

A ready-to-use CI/CD Pipeline for scanning vulnerabilities in your project with Snyk.

License

Notifications You must be signed in to change notification settings

fluent-ci-templates/snyk-pipeline

Repository files navigation

Snyk Pipeline

fluentci pipeline deno compatibility dagger-min-version ci

A ready-to-use CI/CD Pipeline for scanning vulnerabilities in your project with Snyk.

🚀 Usage

Run the following command:

fluentci run snyk_pipeline

Or, if you want to use it as a template:

fluentci init -t snyk

This will create a .fluentci folder in your project.

Now you can run the pipeline with:

fluentci run .

🧩 Dagger Module

Use as a Dagger Module:

dagger install github.com/fluent-ci-templates/snyk-pipeline@main

Call a function from the module:

dagger call iac-test \
  --src . \
  --token env:SNYK_TOKEN \
  --severity-threshold medium

dagger call test \
  --src . \
  --token env:SNYK_TOKEN \
  --severity-threshold medium

🛠️ Environment variables

Variable Description Default
SNYK_TOKEN Your Snyk API token
SNYK_IMAGE_TAG Default snyk image tag to use alpine
SNYK_SEVERITY_THRESHOLD Minimum severity threshold low

✨ Jobs

Job Description
test Checks projects for open source vulnerabilities and license issues
iac_test Checks infrastructure as code for security issues
test(
  src: string | Directory | undefined = ".",
  token?: string | Secret,
  severityThreshold?: string
): Promise<string>

iacTest(
  src: string | Directory | undefined = ".",
  token?: string | Secret,
  severityThreshold?: string
): Promise<string>

👨‍💻 Programmatic usage

You can also use this pipeline programmatically:

import { test } from "jsr:@fluentci/snyk";

await test();

About

A ready-to-use CI/CD Pipeline for scanning vulnerabilities in your project with Snyk.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages