Skip to content
Closed
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
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Proposes updates to the pinned action SHAs (keeping the "# vX.Y.Z" comments current).
# Review each bump like code: an action runs with this repo's token, and in release.yml
# with the permission to sign provenance.
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
cooldown:
default-days: 14
77 changes: 62 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,41 @@ on:
branches: [main]
pull_request:

permissions:
contents: read
permissions: {}

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
# Exact version, at least two weeks old when bumped. playwright depends on exactly
# one package (playwright-core, same version), so this pin fixes the whole tree.
PLAYWRIGHT_VERSION: "1.63.0"

jobs:
build:
runs-on: ubuntu-latest
test:
runs-on: ubuntu-24.04 # pinned image: python3 3.12 and node 20 are preinstalled
timeout-minutes: 10
permissions:
contents: read
id-token: write # build-provenance attestation
attestations: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
python-version: "3.12"
- uses: actions/setup-node@v4
with:
node-version: "20"
persist-credentials: false

- name: Toolchain
run: python3 --version && node --version

- name: Actions pinned to commit SHAs (warning here; release.yml enforces)
run: python3 scripts/check_pinned_actions.py --warn

- name: Engine tests (fixtures through the real engine)
run: node test/fixture.test.js

- name: Build (fails on missing CSP, external resources, leaked tenant code)
- name: Hostile-input tests (attacker-controlled names and ids stay inert)
run: node test/hostile-input.test.js

- name: Build (fails on missing CSP, unhashed scripts, inline handlers, external resources, leaked tenant code)
run: python3 build.py

- name: Built files must match source
Expand All @@ -41,9 +53,44 @@ jobs:
- name: Verify hashes
run: sha256sum -c SHA256SUMS

browser:
# The built files in a real browser: CSP covers the page's own scripts, nothing
# leaves file://, hostile exports stay inert, reports are script-free.
needs: test
runs-on: ubuntu-24.04
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install Playwright ${{ env.PLAYWRIGHT_VERSION }} and Chromium
run: |
npm install --no-save --no-package-lock --ignore-scripts "playwright@${PLAYWRIGHT_VERSION}"
npx --no-install playwright install --with-deps chromium
- name: Browser tests
run: node test/browser.test.js

attest-main:
# Provenance for the files people download straight from main (README route).
# Tagged releases are attested separately by release.yml.
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: [test, browser]
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
contents: read
id-token: write
attestations: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Rebuild and confirm it matches what is committed
run: python3 build.py && git diff --exit-code -- blast-radius-local.html blast-radius-public.html SHA256SUMS
- name: Attest build provenance
if: github.event_name == 'push'
uses: actions/attest-build-provenance@v1
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2
with:
subject-path: |
blast-radius-local.html
Expand Down
130 changes: 130 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
name: release

# Push a tag vX.Y.Z (matching TOOL_VERSION in kb.js) on a commit already on main.
# The workflow re-runs every check, rebuilds, requires the rebuild to be byte-identical
# to the committed files, attests provenance, and publishes the GitHub Release.

on:
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+"]

permissions: {}

concurrency:
group: release
cancel-in-progress: false

env:
PLAYWRIGHT_VERSION: "1.63.0"

jobs:
release:
runs-on: ubuntu-24.04
timeout-minutes: 20
# Add required reviewers to this environment (Settings > Environments) to make
# every release wait for a human approval before anything is signed or published.
environment: release
permissions:
contents: write # create the release
id-token: write # sign the provenance attestation (Sigstore)
attestations: write # store it in the repo's attestation API
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # needed to prove the tag is on main
persist-credentials: false

- name: Every action pinned to a commit SHA
run: python3 scripts/check_pinned_actions.py

- name: Tag is on main
run: |
git fetch --no-tags origin main
if ! git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then
echo "::error::${GITHUB_REF_NAME} points at a commit that is not on main. Merge first, then tag."
exit 1
fi

- name: Tag matches TOOL_VERSION
id: ver
run: |
tool=$(node -e 'const s=require("fs").readFileSync("kb.js","utf8");console.log(s.match(/const TOOL_VERSION = "([^"]+)"/)[1])')
kb=$(node -e 'const s=require("fs").readFileSync("kb.js","utf8");console.log(s.match(/const KB_VERSION = "([^"]+)"/)[1])')
if [ "v${tool}" != "${GITHUB_REF_NAME}" ]; then
echo "::error::Tag ${GITHUB_REF_NAME} does not match TOOL_VERSION ${tool} in kb.js."
exit 1
fi
echo "kb=${kb}" >> "$GITHUB_OUTPUT"

- name: CHANGELOG has an entry for this version
run: |
python3 - <<'PY'
import os, re, sys
v = os.environ["GITHUB_REF_NAME"]
text = open("CHANGELOG.md", encoding="utf-8").read()
m = re.search(rf"^## {re.escape(v)}\b.*?(?=^## |\Z)", text, flags=re.M | re.S)
if not m or len(m.group(0).strip().splitlines()) < 3:
sys.exit(f"::error::CHANGELOG.md has no '## {v}' section. Add one before tagging.")
open("changelog-section.md", "w", encoding="utf-8").write(m.group(0).split("\n", 1)[1].strip() + "\n")
PY

- name: Engine and hostile-input tests
run: node test/fixture.test.js && node test/hostile-input.test.js

- name: Rebuild; must be byte-identical to the committed files
run: |
python3 build.py
git diff --exit-code -- blast-radius-local.html blast-radius-public.html docs/index.html SHA256SUMS
sha256sum -c SHA256SUMS

- name: Browser tests
run: |
npm install --no-save --no-package-lock --ignore-scripts "playwright@${PLAYWRIGHT_VERSION}"
npx --no-install playwright install --with-deps chromium
node test/browser.test.js

- name: Attest build provenance
id: attest
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2
with:
subject-path: |
blast-radius-local.html
blast-radius-public.html

- name: Publish release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.ref_name }}
KB: ${{ steps.ver.outputs.kb }}
BUNDLE: ${{ steps.attest.outputs.bundle-path }}
REPO: ${{ github.repository }}
run: |
cp "$BUNDLE" "blast-radius-${TAG}.sigstore.json"
cat > notes.md <<NOTES
Blast Radius ${TAG} · knowledge base v${KB}

$(cat changelog-section.md)

**blast-radius-local.html** is the offline build (all three modes). Run it from a local file; don't host it publicly.
**blast-radius-public.html** is the before-you-consent build served on GitHub Pages.

### Verify before you paste client data

Hashes:

sha256sum -c SHA256SUMS
Get-FileHash .\\blast-radius-local.html -Algorithm SHA256 # Windows; compare with SHA256SUMS

Provenance (proves the file was built by this repository's release workflow from tag ${TAG}):

gh attestation verify blast-radius-local.html --repo ${REPO} --signer-workflow ${REPO}/.github/workflows/release.yml

The \`blast-radius-${TAG}.sigstore.json\` asset is the same attestation, for use with \`--bundle\`.

Provenance proves origin and integrity, not correctness. The knowledge base version above is the research the verdicts rest on.
NOTES
gh release create "$TAG" \
--verify-tag \
--title "Blast Radius ${TAG}" \
--notes-file notes.md \
blast-radius-local.html blast-radius-public.html SHA256SUMS "blast-radius-${TAG}.sigstore.json"
87 changes: 87 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Changelog

Each release's section is copied into its GitHub release notes. If you compare a
report against one made with an earlier version, read "Verdicts that may change"
first: a different verdict can come from the tool, not from your tenant.

## v0.9.2 (2026-11-11) · knowledge base 2026.11.11b

### Verdicts that may change

- **New Tier-0 permissions and roles.** 31 permissions and 21 roles were added
after a full re-sync with azure-tiering. Apps that showed "no known path" because
a permission was missing from the knowledge base can now show a path. The ones
most likely to matter: `UserAuthMethod-TAP.ReadWrite.All`,
`UserAuthMethod-Phone.ReadWrite.All` and `DelegatedAdminRelationship.ReadWrite.All`
(direct), and Conditional Access Administrator and Tenant Governance Administrator
(direct).
- **Lockout is now its own verdict.** `Policy.ReadWrite.ConditionalAccess`,
`User.DeleteRestore.All`, `User.EnableDisableAccount.All`,
`SignInIdentifier.ReadWrite.All`, Conditional Access Administrator and Security
Administrator can lock every account out of the tenant (a ransom vector) but don't
confer Global Admin's privileges. They show as "Lockout" and are counted apart from
"can reach Global Admin". An app that can backdoor a lockout-only app inherits the
lockout, not Global Admin.
- **Self-escalating permissions are direct in every mode.**
`AppRoleAssignment.ReadWrite.All`, `Policy.ReadWrite.PermissionGrant` and
`PrivilegedAssignmentSchedule.ReadWrite.EntraAppRole` can grant themselves a
Global-Admin-capable permission with nothing else in the tenant. The single-app
check previously said "conditional" for these.
- **Lowered to conditional, matching azure-tiering:** Application Administrator,
Cloud Application Administrator, Hybrid Identity Administrator, Intune
Administrator, `UserAuthMethod-HardwareOATH.ReadWrite.All`,
`UserAuthMethod-QR.ReadWrite.All`. Whole-tenant mode still shows Global Admin when
the export proves the chain (for example, an Application Administrator and a
privileged app to backdoor).
- **Directory Synchronization Accounts no longer counts as able to plant app
credentials**, so it no longer produces "confirmed via chain" paths.
- **Partner Tier1 Support and Hybrid Identity Administrator now count as able to
plant app credentials**, matching their published attack paths.
- **Corrected explanations:** Groups, User, Helpdesk, Exchange and SharePoint
Administrator. A password reset alone doesn't get past MFA, and Groups
Administrator can't touch role-assignable groups.

### Safety

- Names and IDs from an export are escaped once, everywhere they're rendered. A
crafted export could previously run script through an app ID or tenant ID.
- The page's Content Security Policy allows only the page's own scripts (by hash),
so injected markup can't run even if escaping fails. Exported reports allow no
script at all; print them with Ctrl+P (⌘P).
- An export without `tenantId` now says the cross-tenant credential checks did not
run, instead of reporting 0.

### Releases and verification

- Releases are built by CI and carry `SHA256SUMS` plus a signed build-provenance
attestation: `gh attestation verify blast-radius-local.html --repo pslorenz/blast-radius`.
- CI runs engine, hostile-input and headless-browser tests on every change.
- The knowledge base is checked against azure-tiering snapshots
(`scripts/sync_azure_tiering.py`).

### Fixes

- Unescaped and double-escaped text in results and reports (for example a
credential named `Bob's key` showed as `Bob&#39;s key`).
- The partner fixture test depended on the wall clock and started failing on
2026-11-01.

## v0.9.1 · knowledge base 2026.10.22b

- PIM-eligible role-assignable groups modeled as a gated path.
- App registration owners exported; service-principal owners treated as backdoor
edges.
- Windows PowerShell 5.1 credential dates (`/Date(ms)/`) parsed; they previously
disabled every time-based flag.
- Delegated grants (`oauth2PermissionGrants`) read from the export.
- Credentials on Microsoft first-party service principals get their own flag.
- Unverified incident details removed from knowledge-base entries.

## v0.9.0 · knowledge base 2026.10.22

- Cross-tenant credential detection (the ConnectWise/SkyKick persistence pattern),
with a reviewed allowlist.
- PIM-eligible Global Admin as a distinct, gated verdict.
- Ownership paths (human and service-principal owners).
- Credential source (app registration or service principal) and a "changed since"
filter.
Loading
Loading