Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,24 @@ on:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1
with:
persist-credentials: false

- name: Setup Socket Firewall
uses: workos/setup-socket-firewall@ca93dd8aa351f54f4729fe3377a9be23c631c25d
with:
token: ${{ secrets.PUBLIC_SOCKET_FIREWALL_TOKEN }}
allow-external-fork-fallback: true
configure-bun: true

- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # 2.2.0
with:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,22 @@ jobs:
with:
ref: ${{ inputs.tag_name }}

- name: Setup Socket Firewall
uses: workos/setup-socket-firewall@ca93dd8aa351f54f4729fe3377a9be23c631c25d
with:
token: ${{ secrets.PUBLIC_SOCKET_FIREWALL_TOKEN }}
configure-bun: true

- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # 2.2.0
with:
bun-version: 1.3.14

- name: Install all target-specific dependencies
run: bun install --frozen-lockfile --os="*" --cpu="*"

- name: Teardown Socket Firewall
uses: workos/setup-socket-firewall/teardown@ca93dd8aa351f54f4729fe3377a9be23c631c25d

# prebuild regenerates the manifests with the same WORKOS_BUILD_TARGET,
# so the pinned Agent SDK download metadata (version, URL, checksum)
# matches the compile target.
Expand Down Expand Up @@ -226,9 +235,18 @@ jobs:
# registry and drive the real `npx workos` / `npm install -g workos`
# flows (linux-x64 binary executes on this runner). A packaging
# regression fails here instead of after touching npmjs.org.
- name: Setup Socket Firewall
uses: workos/setup-socket-firewall@ca93dd8aa351f54f4729fe3377a9be23c631c25d
with:
token: ${{ secrets.PUBLIC_SOCKET_FIREWALL_TOKEN }}
configure-bun: true

- name: Smoke test npm distribution against a local registry
run: bun run ./scripts/npm-dist-smoke.ts

- name: Teardown Socket Firewall
uses: workos/setup-socket-firewall/teardown@ca93dd8aa351f54f4729fe3377a9be23c631c25d

- name: Determine npm tag
id: npm-tag
env:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/socket-tier1-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
description: 'Required by the return-dispatch action'
required: true

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
Expand All @@ -27,6 +30,10 @@ jobs:
echo "distinct_id: ${{ github.event.inputs.distinct_id }}"
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1
- name: Setup Socket Firewall
uses: workos/setup-socket-firewall@ca93dd8aa351f54f4729fe3377a9be23c631c25d
with:
token: ${{ secrets.PUBLIC_SOCKET_FIREWALL_TOKEN }}
- name: Install Socket CLI
run: npm install -g socket
- name: Run Tier 1 reachability scan
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,25 @@ on:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1
with:
persist-credentials: false

- name: Setup Socket Firewall
id: socket-firewall
uses: workos/setup-socket-firewall@ca93dd8aa351f54f4729fe3377a9be23c631c25d
with:
token: ${{ secrets.PUBLIC_SOCKET_FIREWALL_TOKEN }}
allow-external-fork-fallback: true
configure-bun: true

- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # 2.2.0
with:
Expand All @@ -19,6 +32,10 @@ jobs:
- name: Install
run: bun install --frozen-lockfile

- name: Teardown Socket Firewall
if: steps.socket-firewall.outputs.active == 'true'
uses: workos/setup-socket-firewall/teardown@ca93dd8aa351f54f4729fe3377a9be23c631c25d

- name: Test
run: bun run test

Expand Down Expand Up @@ -84,6 +101,13 @@ jobs:
# selection, and the launcher's no-binary error path — from a hermetic
# environment. This exercises the npm machinery the in-repo launcher
# check can't (registry fetch, optionalDependencies, npx cache/bin).
- name: Setup Socket Firewall for npm distribution smoke
uses: workos/setup-socket-firewall@ca93dd8aa351f54f4729fe3377a9be23c631c25d
with:
token: ${{ secrets.PUBLIC_SOCKET_FIREWALL_TOKEN }}
allow-external-fork-fallback: true
configure-bun: true

- name: Smoke test npm distribution against a local registry
env:
WORKOS_NPM_ALLOW_MISSING: '1'
Expand Down