Skip to content

Commit 069b3b4

Browse files
committed
DevOps Shield - DevSecOps Automation - Create devopsshield-sca-anchore-syft.yml
1 parent bc8cc0a commit 069b3b4

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Last applied at: Fri, 24 Jan 2025 13:36:28 GMT
2+
# DevOps Shield - The ultimate DevSecOps platform designed to secure your DevOps.
3+
# https://devopsshield.com
4+
##############################################################
5+
# This is a DevOps Shield - Application Security - Code Security Template.
6+
7+
# This workflow template uses actions that are not certified by DevOps Shield.
8+
# They are provided by a third-party and are governed by separate terms of service, privacy policy, and support documentation.
9+
10+
# Use this workflow template for integrating code security into your pipelines and workflows.
11+
12+
# DevOps Shield Workflow Template Details:
13+
# ------------------------------------------------------------
14+
# Code: GH_SCA_ANCHORE_SYFT
15+
# Name: Anchore Syft SBOM Scan
16+
# DevSecOpsControls: SCA
17+
# Provider: Anchore
18+
# Categories: Code Scanning, Dockerfile, Dependency Management
19+
# Description:
20+
# Produce Software Bills of Materials based on Anchore's open source Syft tool.
21+
# Syft is a powerful and easy-to-use open-source tool for generating Software Bill of Materials (SBOMs) for container images and filesystems.
22+
# It provides detailed visibility into the packages and dependencies in your software, helping you manage vulnerabilities, license compliance, and software supply chain security.
23+
# This workflow checks out code, builds an image, performs a container image
24+
# scan with Anchore's Syft tool, and uploads the results to the GitHub Dependency submission API.
25+
# Read the official documentation to find out more.
26+
# For more information:
27+
# https://github.com/anchore/syft
28+
# ------------------------------------------------------------
29+
# Source repository: https://github.com/anchore/sbom-action
30+
##############################################################
31+
32+
name: Anchore Syft SBOM Scan
33+
34+
on:
35+
push:
36+
branches: [ main ]
37+
38+
jobs:
39+
anchore-syft-Scan:
40+
name: Anchore Syft SBOM Scan
41+
42+
runs-on: ubuntu-latest
43+
44+
permissions:
45+
contents: write # required to upload to the Dependency submission API
46+
actions: read # to find workflow artifacts when attaching release assets
47+
48+
steps:
49+
- name: Checkout code
50+
uses: actions/checkout@v4
51+
52+
- name: Build the Docker image
53+
run: docker build . --file Dockerfile --tag localbuild/testimage:latest
54+
55+
- name: Scan the image and upload dependency results
56+
uses: anchore/sbom-action@v0
57+
with:
58+
image: "localbuild/testimage:latest"
59+
artifact-name: image.spdx.json
60+
dependency-snapshot: true

0 commit comments

Comments
 (0)