Skip to content

Commit 9057fa8

Browse files
Merge pull request #2976 from ably/stop-the-second-coming
[WEB-4835] Add Shai Hulud supply chain attack protections
2 parents 903064c + 91f5cdf commit 9057fa8

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

.circleci/config.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,27 @@ jobs:
5050
- store_artifacts:
5151
path: coverage
5252

53+
security-audit:
54+
executor:
55+
name: default
56+
steps:
57+
- checkout
58+
- attach_workspace:
59+
at: .
60+
- run:
61+
name: Run security audit
62+
command: |
63+
yarn audit --level critical || {
64+
EXIT_CODE=$?
65+
if [ $EXIT_CODE -eq 16 ]; then
66+
echo "❌ Critical vulnerabilities found"
67+
exit 1
68+
else
69+
echo "✓ No critical vulnerabilities (exit code: $EXIT_CODE)"
70+
exit 0
71+
fi
72+
}
73+
5374
build:
5475
environment:
5576
ASSET_COMPRESSION_ITERATIONS: 1
@@ -143,6 +164,9 @@ workflows:
143164
unless: << pipeline.parameters.content-update >>
144165
jobs:
145166
- install-dependencies
167+
- security-audit:
168+
requires:
169+
- install-dependencies
146170
- test:
147171
requires:
148172
- install-dependencies

.github/dependabot.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: "npm"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
# Security: 7-day cooldown gives the community time to detect and report
9+
# malicious packages before they're automatically proposed for our codebase
10+
# This protects against supply chain attacks like Shai Hulud
11+
# See internal security docs: Search Confluence Web space for 'Supply Chain Security'
12+
cooldown:
13+
default-days: 7
14+
include: ['*']
15+
# Check for security updates and dependencies
16+
open-pull-requests-limit: 2
17+
ignore:
18+
- dependency-name: "posthog-js"
19+
versioning-strategy: increase
20+
21+
# Separate group for posthog-js which is aggressive in releasing updates
22+
- package-ecosystem: npm
23+
directory: "/"
24+
schedule:
25+
interval: weekly
26+
cooldown:
27+
default-days: 7
28+
include: ['*']
29+
open-pull-requests-limit: 2
30+
versioning-strategy: increase
31+
allow:
32+
- dependency-name: "posthog-js"

0 commit comments

Comments
 (0)