Repository navigation
69 lines (58 loc) · 2.42 KB
/
Copy pathsecurity.yml
File metadata and controls
69 lines (58 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Security Analysis
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
paths:
- '.github/workflows/**'
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
security:
name: Security Analysis
runs-on: ubuntu-latest
permissions:
contents: read
steps:
# Checkout self and clone upstream rolldown so the bundled cargo-deny check
# inside security-action can resolve workspace members that reference
# `rolldown/crates/*`. Then clear origin so security-action's nested
# taiki-e/checkout-action can re-add it without conflict.
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- name: Output rolldown hash
id: upstream-versions
shell: bash
run: |
node -e "console.log('ROLLDOWN_HASH=' + require('./packages/tools/.upstream-versions.json').rolldown.hash)" >> $GITHUB_OUTPUT
node -e "console.log('OXC_NODE_HASH=' + require('./packages/tools/.upstream-versions.json')['oxc-node'].hash)" >> $GITHUB_OUTPUT
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: rolldown/rolldown
path: rolldown
ref: ${{ steps.upstream-versions.outputs.ROLLDOWN_HASH }}
persist-credentials: false
# The binding's `oxc-node` path dependency must resolve against the
# patched manifest recorded in Cargo.lock.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: oxc-project/oxc-node
path: oxc-node
ref: ${{ steps.upstream-versions.outputs.OXC_NODE_HASH }}
persist-credentials: false
# Run the patch script with native TypeScript support instead of unpinned `npx tsx`.
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .node-version
package-manager-cache: false
- name: Patch vendored oxc-node
shell: bash
run: node packages/tools/src/patch-oxc-node.ts
- name: Clear git origin for nested checkout
shell: bash
run: git remote remove origin
- uses: oxc-project/security-action@a8d382d3e5d0fccc813776e461cb0c3fb9d51a0d # v1.0.10