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

@wizardelf/ican

v0.1.0

Published

ICAN - Local-first IAM policy evaluation engine for static analysis and CI/code-review assistance

Readme

ICAN — Local-first IAM Policy Evaluation MVP

ICAN is a local-first, test-driven IAM policy evaluation engine. It takes IAM policy documents and access requests, evaluates them through a statement-by-statement matching pipeline, and returns structured allow/deny decisions with human-readable output and reproducible results.

Status: ICAN S01 (Phase 1) is complete. This is a core MVP — it works end-to-end as a CLI tool, but it is not a full AWS IAM simulator.


What S01 Can Do

  • Parse IAM policy documents (JSON, Version 2012-10-17)
  • Evaluate Allow and Deny statements with Action, Resource, and Condition matching
  • Support StringEquals, StringLike, Bool, and IpAddress condition operators
  • Produce path traces that explain which statements were evaluated
  • Output results as structured JSON or human-readable text
  • Map results to standard exit codes:
    • 0 — allowed
    • 1 — explicitly denied
    • 2 — input or validation error
    • 3 — unsupported feature or indeterminate result
    • 4 — implicitly denied (no applicable Allow)
    • 10 — internal error
  • Usage Guide — full CLI walkthrough
  • Examples & Fixtures — fixture cases and golden outputs
  • Release Checklist — pre-release verification
  • Technical Debt — known debt register

The package.json bin field registers ican as the CLI name. Before packaging or linking, the examples below use node dist/cli/ican.js check directly.

What S01 Does Not Do

  • It does not evaluate full AWS IAM semantics
  • It does not support NotAction, NotResource, ForAllValues, ForAnyValue
  • It does not validate actual cloud resources
  • It does not include any real-world IAM policy samples
  • It is not a production-grade IAM auditing tool
  • Subsequent phases (not yet started) may extend these capabilities

Quick Start

Prerequisites

  • Node.js (tested with Node 20+)
  • npm (included with Node.js)

Install Dependencies

npm install         # Install all dependencies

From npm (when published)

npm install -g @wizardelf/ican   # Global install
npx @wizardelf/ican check --help  # Or via npx

The npm package is published manually by the project maintainer. Until published, use the local development setup below.

Run Tests

npm run typecheck   # TypeScript type checking
npm run test -- --run   # All tests
npm run build       # Compile to dist/

All tests pass (1090 test cases, 29 test files as of S01 completion).

Run ican check

# Build first if you haven't:
npm run build

# Show help:
node dist/cli/ican.js check --help

# Basic allow evaluation — write a policy JSON file:
cat > /tmp/example-policy.json << 'EOF'
{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Action": ["s3:GetObject"],
    "Resource": ["arn:aws:s3:::example-bucket/*"]
  }]
}
EOF

# Run the check:
node dist/cli/ican.js check \
  --policy /tmp/example-policy.json \
  --action s3:GetObject \
  --resource arn:aws:s3:::example-bucket/photo.jpg

# JSON output:
node dist/cli/ican.js check --format json \
  --policy /tmp/example-policy.json \
  --action s3:GetObject \
  --resource arn:aws:s3:::example-bucket/photo.jpg

Fixtures & Golden Output

ICAN uses a fixtures-driven testing approach:

  • Actual fixtures (test-fixtures/cases/): 6 synthetic cases covering allow, explicit deny, implicit deny, unsupported conditions, invalid input, and multi-policy precedence.
  • Golden output (expected/): 18 pre-generated expected output files (JSON, text, exit code) that act as a stable acceptance baseline.
  • No real-world IAM samples are included — all fixtures are hand-crafted and synthetic.

Golden output files do not contain any absolute paths (such as /home/ or /tmp/) and are portable across environments.


Project Boundaries

  • No real-world IAM policy samples, real AWS account IDs, or organization-specific ARNs
  • All ARNs in examples and fixtures are synthetic placeholders
  • All fixtures are synthetic and minimal
  • The purpose of this project is engineering demonstration and skill verification, not a production IAM service
  • Future phases are not yet planned or approved

License

Licensed under the Apache License, Version 2.0. See LICENSE for the full text.


What's Next?

ICAN S01 is complete. The project is currently in release candidate preparation phase (RC01). The next steps — README refinement, usage manual, example documentation, release checklist, and security boundary review — will be carried out under the RC01 topic before any decision is made on subsequent phases.