npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

oidc-audit

v1.0.0

Published

Scan AWS IAM roles for OIDC trust policy misconfigurations in GitHub Actions. Free CLI by TrustFix.

Readme

oidc-audit

Scan AWS IAM roles for OIDC trust policy misconfigurations in GitHub Actions. Free CLI by TrustFix.

Quick Start

npx oidc-audit scan

What It Detects

| Finding Type | Severity | Description | |-------------|----------|-------------| | MISSING_SUB_CLAIM | CRITICAL | Trust policy allows any GitHub repo to assume the role | | WILDCARD_SUB_CLAIM | CRITICAL | Overly permissive wildcard in sub claim (*, repo:*) | | MISSING_AUD_CLAIM | HIGH | Missing audience claim validation | | ORG_WIDE_TRUST | HIGH | Allows any repository in an organization | | PULL_REQUEST_ALLOWED | HIGH | Allows pull_request events (external contributors) | | FORKED_REPO_ALLOWED | HIGH | May allow forked repositories | | REF_TYPE_MISSING | MEDIUM | No branch/tag restriction | | ENVIRONMENT_NOT_REQUIRED | MEDIUM | No GitHub environment requirement | | WORKFLOW_NOT_PINNED | MEDIUM | Not pinned to specific workflow file | | ACTOR_NOT_RESTRICTED | LOW | No actor/user restriction |

Usage

# Scan with default AWS credentials
npx oidc-audit scan

# Use a specific AWS profile
npx oidc-audit scan --profile production

# Cross-account scan with assumed role
npx oidc-audit scan --role-arn arn:aws:iam::123456789012:role/AuditRole

# JSON output for CI/CD
npx oidc-audit scan --json

# Filter by minimum severity
npx oidc-audit scan --severity HIGH

Options

| Flag | Description | Default | |------|-------------|---------| | --profile <name> | AWS profile to use | default | | --region <region> | AWS region | us-east-1 | | --role-arn <arn> | IAM role ARN for cross-account scanning | - | | --json | Output as JSON | false | | --severity <level> | Minimum severity (CRITICAL, HIGH, MEDIUM, LOW) | LOW |

Required IAM Permissions

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "iam:ListRoles",
        "iam:GetRole"
      ],
      "Resource": "*"
    }
  ]
}

CI/CD Integration

GitHub Actions

name: OIDC Audit
on: [push, pull_request]

jobs:
  scan:
    runs-on: ubuntu-latest
    permissions:
      id-token: write
      contents: read
    steps:
      - uses: aws-actions/configure-aws-credentials@v4
        with:
          role-to-assume: arn:aws:iam::123456789012:role/AuditRole
          aws-region: us-east-1

      - name: Run OIDC audit
        run: npx oidc-audit scan --severity HIGH

Example Output

🔍 TrustFix OIDC Audit Scanner

Scanning account: 123456789012
Found 47 IAM roles, analyzing trust policies...

Summary:
  Critical: 2  High: 5  Medium: 8  Low: 3

┌──────────┬────────────────────────────┬──────────────────────────────┬──────────────────────────────────────────────────┐
│ Severity │ Finding Type               │ Role                         │ Description                                      │
├──────────┼────────────────────────────┼──────────────────────────────┼──────────────────────────────────────────────────┤
│ CRITICAL │ MISSING_SUB_CLAIM          │ github-actions-deploy        │ OIDC trust policy allows any GitHub repository  │
│          │                            │                              │ to assume this role                              │
├──────────┼────────────────────────────┼──────────────────────────────┼──────────────────────────────────────────────────┤
│ HIGH     │ ORG_WIDE_TRUST             │ ci-cd-role                   │ OIDC trust policy allows any repository in the  │
│          │                            │                              │ organization                                     │
└──────────┴────────────────────────────┴──────────────────────────────┴──────────────────────────────────────────────────┘

❌ Critical or high severity issues found. Review and remediate before merging.

Why This Matters

OIDC trust policies are a powerful way to grant GitHub Actions access to AWS without long-lived credentials. But misconfigured trust policies can allow unauthorized repositories — even forks or external contributors — to assume your IAM roles.

TrustFix scans your AWS account and identifies trust policies that are:

  • Too permissive (missing sub claim, wildcards)
  • Missing critical conditions (audience, branch restrictions)
  • Vulnerable to supply chain attacks (pull_request events, forked repos)

Get More with TrustFix Pro

The CLI detects issues. TrustFix Pro fixes them:

  • AI-generated Terraform fix PRs — Claude writes the fix, validates it
  • Policy Intelligence Engine — 45+ deterministic assertions
  • Confidence scores — Know how safe each fix is before merging
  • Blast-radius analysis — See what the fix affects

Start free at trustfix.dev

License

MIT — see LICENSE