Skip to content

Commit 31ffee5

Browse files
authored
[OJ-53844] Ensure Endor scans work for uv (#444)
1 parent 1583e2e commit 31ffee5

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/endor.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,23 @@ jobs:
1212
id-token: write # Used for keyless authentication with Endor Labs
1313
issues: write # Required to automatically comment on PRs for new policy violations
1414
pull-requests: write # Required to automatically comment on PRs for new policy violations
15+
env:
16+
ENDOR_SCAN_ENABLE_UV_PACKAGE_MANAGER: false
1517
runs-on: ubuntu-latest
1618
steps:
1719
- name: Checkout Repository
1820
uses: actions/checkout@v3
1921
- name: Install pre-reqs
2022
run: pip install --user uv
23+
- name: Generate requirements.txt
24+
run: uv export --locked --no-editable --no-emit-local > requirements.txt
25+
- name: Remove uv files which confuse Endor
26+
run: rm uv.lock && rm pyproject.toml
27+
- name: Install
28+
run: pip install -r requirements.txt
2129
- name: Endor Labs Scan Pull Request
2230
if: github.event_name == 'pull_request'
23-
uses: endorlabs/github-action@v1.1.7
31+
uses: endorlabs/github-action@v1.1.12 # Endor uses immutable releases so hash pinning not required
2432
with:
2533
namespace: "jellyfish" # Replace with your Endor Labs tenant namespace
2634
scan_dependencies: true
@@ -31,7 +39,7 @@ jobs:
3139
additional_args: "--exit-on-policy-warning"
3240
- name: Endor Labs Scan Push to main
3341
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
34-
uses: endorlabs/github-action@v1.1.7
42+
uses: endorlabs/github-action@v1.1.12 # Endor uses immutable releases so hash pinning not required
3543
with:
3644
namespace: "jellyfish" # Replace with your Endor Labs tenant namespace
3745
scan_dependencies: true

0 commit comments

Comments
 (0)