Skip to content

Commit 506ec6f

Browse files
Default branch set in Endor Labs
1 parent f275628 commit 506ec6f

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Generate SBOM
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- 'master'
8+
- 'releases/**'
9+
- 'CXX**'
10+
11+
env:
12+
BUILD_TYPE: Release
13+
BUILD: ${{github.workspace}}/build
14+
CXX_STANDARD: 17
15+
ENDOR_NAMESPACE: mongodb.${{github.repository_owner}}
16+
17+
jobs:
18+
configure-and-scan:
19+
permissions:
20+
id-token: write # Required to request a json web token (JWT) for keyless authentication with Endor Labs
21+
#packages: write
22+
contents: read
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout Repository
26+
uses: actions/checkout@v6
27+
with:
28+
submodules: recursive
29+
30+
- name: Install libsasl2-dev
31+
run: sudo apt install -y libsasl2-dev
32+
33+
- name: Configure CMake and fetch dependency source
34+
run: cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_STANDARD=${{env.CXX_STANDARD}}
35+
working-directory: ${{env.BUILD}}
36+
37+
- name: Install endorctl and Scan with Endor Labs
38+
uses: endorlabs/github-action@519df81de5f68536c84ae05ebb2986d0bb1d19fc # Release v1.1.8
39+
with:
40+
additional_args: '--languages=c --include-path="build/_deps/**" --exclude-path="src/**"'
41+
log_level: info
42+
log_verbose: false
43+
pr: false
44+
scan_dependencies: true
45+
tags: github_action
46+
env:
47+
ENDOR_SCAN_EMBEDDINGS: true
48+
49+
# - uses: actions/setup-python@v6
50+
# with:
51+
# python-version: '3.10'
52+
# - run: python my_script.py
53+
54+
# ${{ github.sha }}
55+
# - name: Run Endorctl
56+
# env:
57+
# ENDOR_GITHUB_ACTION_TOKEN_ENABLE: true
58+
# ENDOR_SCAN_DEPENDENCIES: true
59+
# ENDOR_SCAN_EMBEDDINGS: true
60+
# ENDOR_SCAN_INCLUDE_PATH:
61+
# ENDOR_SCAN_LANGUAGES: c
62+
# ENDOR_SCAN_SUMMARY_OUTPUT_TYPE: json
63+
# ENDOR_SCAN_TAGS: github_action
64+
# run: |
65+
# endorctl scan
66+
67+

0 commit comments

Comments
 (0)