
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@shieldly/cdk-guard
Advanced tools
AI-Powered AWS security analysis as a CDK Construct — catch risky IAM and CloudFormation in every cdk synth
AI-Powered AWS security analysis for CDK apps. Catch risky IAM policies and
CloudFormation misconfigurations on every cdk synth — before you deploy.
npm install --save-dev @shieldly/cdk-guard
Get an API key at shieldly.io/app/api (API keys require a Builder plan or above; a free demo runs without a key).
Privacy: your CDK templates are never logged. Cache keys are one-way SHA-256 hashes.
Runs cdk synth then analyzes all synthesized stacks:
npx @shieldly/cdk-guard
# Pass extra cdk synth flags after --
npx @shieldly/cdk-guard -- --context env=prod
# Fail only on Critical findings
npx @shieldly/cdk-guard --fail-on Critical
# Analyze an existing cdk.out/ without re-synthesizing
npx @shieldly/cdk-guard --no-synth --out-dir cdk.out
# JSON output for scripting
npx @shieldly/cdk-guard --format json | jq '.[].findings[]'
Set your API key via environment variable:
export SHIELDLY_API_KEY=sk_live_...
npx @shieldly/cdk-guard
Add ShieldlyGuard to your CDK app. It runs automatically after cdk synth
via process.on('beforeExit') — no explicit call needed.
import * as cdk from 'aws-cdk-lib';
import { ShieldlyGuard } from '@shieldly/cdk-guard';
const app = new cdk.App();
// Add the guard — reads SHIELDLY_API_KEY from environment by default.
new ShieldlyGuard({
failOn: 'High', // Critical | High | Medium | Low | none
});
new MyStack(app, 'MyStack');
// Guard analyzes cdk.out/ automatically when the process exits.
Options:
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | SHIELDLY_API_KEY env | Shieldly API key |
failOn | string | 'High' | Exit code 1 if findings at or above this severity |
outDir | string | 'cdk.out' | CDK output directory to analyze |
apiUrl | string | https://api.shieldly.io | Override for self-hosted / dev |
silent | boolean | false | Suppress all console output |
import * as cdk from 'aws-cdk-lib';
import { shieldlyGuard } from '@shieldly/cdk-guard';
const app = new cdk.App();
const stack = new MyStack(app, 'MyStack');
const assembly = app.synth();
const { failed } = await shieldlyGuard(assembly.directory, {
failOn: 'High',
});
if (failed) process.exit(1);
Runs analysis after every cdk synth automatically — works with any CDK language:
{
"app": "node bin/my-app.js",
"hooks": {
"afterSynth": ["npx", "@shieldly/cdk-guard", "--no-synth"]
}
}
- name: CDK security check
run: npx @shieldly/cdk-guard
env:
SHIELDLY_API_KEY: ${{ secrets.SHIELDLY_API_KEY }}
{
"scripts": {
"synth:check": "cdk synth && npx @shieldly/cdk-guard --no-synth",
"deploy:safe": "npx @shieldly/cdk-guard && cdk deploy"
}
}
cdk.out/manifest.json) to find synthesized stack
templates for the current synthesis only (not stale outputs from prior runs).*.template.json to the Shieldly AI analysis engine
(POST /v1/analyze/cf).1 if any finding meets or
exceeds the failOn severity threshold.Amazon Web Services (AWS) is a trademark of Amazon.com, Inc. Shieldly is not affiliated with, endorsed by, or sponsored by Amazon Web Services.
FAQs
AI-Powered AWS security analysis as a CDK Construct — catch risky IAM and CloudFormation in every cdk synth
The npm package @shieldly/cdk-guard receives a total of 2 weekly downloads. As such, @shieldly/cdk-guard popularity was classified as not popular.
We found that @shieldly/cdk-guard demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.