Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/vulnerability-scans.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2026 Specter Ops, Inc.
#
# Licensed under the Apache License, Version 2.0
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

name: Vulnerability Scan

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Does the workflow support review-time triage so teams can fix, suppress, or justify findings before merge? How does that work if so?


on:
pull_request:
branches:
- main
- "stage/**"
types:
- opened
- synchronize
- reopened

jobs:
scan-sbom-file:
runs-on: ubuntu-latest
steps:
- name: Checkout source code for this repository
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # ratchet:actions/checkout@v5
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Comment thread
coderabbitai[bot] marked this conversation as resolved.

- name: Create SBOM File
uses: anchore/sbom-action@e22c389904149dbc22b58101806040fa8d37a610 #v1.42.3
with:
format: spdx-json
output-file: "${{ github.event.repository.name }}-sbom.spdx.json"
config: .syft.yaml

- name: Scan SBOM File
uses: anchore/scan-action@e1165082ffb1fe366ebaf02d8526e7c4989ea9d2 # v7.4.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Should the sha pinning here be done by ratchet to be consistent with our other workflows? Managing them separately might add some maintenance overhead but I'm not certain.

with:
sbom: "${{ github.event.repository.name }}-sbom.spdx.json"
by-cve: true
severity-cutoff: critical

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: Our previous scanning had a high severity cutoff iirc. Might be good to verify what a good severity cutoff is. I believe we do high severity cutoff for JS deps.

only-fixed: true
17 changes: 17 additions & 0 deletions .syft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2026 Specter Ops, Inc.
#
# Licensed under the Apache License, Version 2.0
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
exclude:
- "./node_modules/**"
Loading