Skip to content

Commit 3d416d0

Browse files
Merge pull request #85 from browserstack/fix/aps-19076-19077-19078-security-bundle
[APS-19076][APS-19077][APS-19078] fix: security hardening — env-var allowlist, workflow SHA pinning, report HTML sanitization
2 parents d6cb8ba + 88b3a53 commit 3d416d0

11 files changed

Lines changed: 23421 additions & 6131 deletions

File tree

.github/workflows/setup-env.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,23 @@ on:
1010
- '.github/workflows/setup-env*'
1111

1212

13+
# Security (APS-19077): least-privilege token scope. These workflows only
14+
# run unit tests; they do not push, comment, or release. Read access to repo
15+
# contents is sufficient.
16+
permissions:
17+
contents: read
18+
1319
jobs:
1420
unit-tests:
1521
runs-on: ${{ matrix.operating-system }}
1622
strategy:
1723
matrix:
1824
operating-system: [ubuntu-latest, macos-latest, windows-latest]
1925
steps:
20-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2127

2228
- name: Set Node.js 24.x
23-
uses: actions/setup-node@master
29+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2430
with:
2531
node-version: 24.x
2632
cache: 'npm'

.github/workflows/setup-local.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,23 @@ on:
1010
- '.github/workflows/setup-local*'
1111

1212

13+
# Security (APS-19077): least-privilege token scope. These workflows only
14+
# run unit tests; they do not push, comment, or release. Read access to repo
15+
# contents is sufficient.
16+
permissions:
17+
contents: read
18+
1319
jobs:
1420
unit-tests:
1521
runs-on: ${{ matrix.operating-system }}
1622
strategy:
1723
matrix:
1824
operating-system: [ubuntu-latest, macos-latest, windows-latest]
1925
steps:
20-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2127

2228
- name: Set Node.js 24.x
23-
uses: actions/setup-node@master
29+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2430
with:
2531
node-version: 24.x
2632
cache: 'npm'

0 commit comments

Comments
 (0)