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

@shieldly/iam-lint

v1.1.0

Published

Lightweight, static-heuristic AWS IAM policy linter — no network, no AWS SDK dependency

Readme

@shieldly/iam-lint

Lightweight, static-heuristic AWS IAM policy linter. No network calls, no AWS SDK dependency — just deterministic rules over a parsed policy document. Powered by Shieldly.

npm install @shieldly/iam-lint

Usage

import { lint } from '@shieldly/iam-lint';

const policy = {
  Version: '2012-10-17',
  Statement: [
    { Effect: 'Allow', Action: 's3:*', Resource: '*' },
  ],
};

const findings = lint(policy);
// [
//   { sev: 'high', title: 'Statement 1: Service-wide wildcard "s3:*"', detail: '...' },
//   { sev: 'medium', title: 'Statement 1: Resource "*"', detail: '...' },
// ]

Each finding has a sev (critical | high | medium | info), a title, a detail, and an optional link — when present, a path relative to https://www.shieldly.io with more context (e.g. /iam/iam-passrole explains that specific privilege-escalation path).

CLI

The package ships an iam-lint command for CI and local use:

npx @shieldly/iam-lint policies/*.json
# or, installed globally:
iam-lint --fail-on medium policies/lambda-role.json
  • Exits 1 when any finding at or above the --fail-on threshold is found (default: high).
  • Files wrapped in a PolicyDocument key (CloudFormation-style) are unwrapped automatically.
  • JSON files without a Statement element are skipped, so globbing broadly is safe.

pre-commit hook

Lint IAM policies on every commit with pre-commit:

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/shieldly-io/iam-lint
    rev: v1.1.0
    hooks:
      - id: iam-lint
        files: ^policies/.*\.json$   # scope to your IAM policy files (optional but faster)

Pass CLI flags through args, e.g. args: [--fail-on, medium].

What this checks

  • Full wildcard actions (Action: "*")
  • Service-wide wildcard actions (e.g. s3:*)
  • Privilege-escalation-capable actions (iam:PassRole, iam:CreatePolicyVersion, iam:AttachUserPolicy, and others)
  • NotAction combined with Allow
  • Wildcard resources (Resource: "*")
  • Wildcard principals on resource-based policies (with or without a Condition)
  • Missing Effect

What this does NOT do

This applies fast, deterministic static rules — it does not reason about how permissions combine across statements, accounts, or services, and it does not resolve variables or evaluate conditions. For that — plus a plain-English explanation and a corrected policy — use Shieldly's AI-Powered analyzer. It's free to try, no signup required for the demo.

This is the same linting logic behind the free browser tool at shieldly.io/tools/iam-policy-linter.

Privacy

This package runs entirely locally — it never makes a network call. Nothing you lint is sent anywhere.

Free tools & references (no signup)

License

MIT