Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@layertwo/cdk-constructs

Latest version: v0.0.14

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: layertwo
1 Stars
0 Forks
5 Versions
TypeScript Repo language

Scan summary

@layertwo/cdk-constructs was last scanned on 29 Nov 2026 at version 0.0.14. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 5 versions, all published on 29 Nov 2026.
  • Findings: No rules fired in version 0.0.14.

Versions

5 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.0.14 LATEST 29 Nov 2026 No rules fired
0.0.13 29 Nov 2026 No rules fired
0.0.12 29 Nov 2026 No rules fired
0.0.11 29 Nov 2026 Not shown
0.0.0-stage 29 Nov 2026 Not shown

No rules fired in 0.0.14

Findings

Findings for v0.0.14. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.0.14; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@layertwo/cdk-constructs

Reusable AWS CDK constructs with secure defaults baked in, for TypeScript projects.

Published to npm as a JSII library. Only the TypeScript/JS package is published.

Installation

npm install @layertwo/cdk-constructs

Constructs

Construct Extends Enforced behaviour
SecureBucket s3.Bucket Blocks all public access, S3-managed encryption, SSL enforced. Versioning on by default (versioned: false to opt out).
SecureTable dynamodb.Table On-demand billing (PAY_PER_REQUEST), point-in-time recovery always enabled.
GitHubOidcRole iam.Role Role assumable by GitHub Actions via OIDC, scoped to a repo and optionally a branch or environment.
DnsValidatedCertificate certificatemanager.Certificate Always DNS-validated against the supplied Route53 hosted zone.
PythonFunction lambda.Function Bundles a uv project in Docker, hashes the source tree (no re-upload when nothing changed), ARM64 + Python 3.15 by default.
UvLayer lambda.LayerVersion Packages a uv project's dependencies under /opt/python, ARM64 + Python 3.15 by default.

Everything marked enforced is hardcoded after your props are spread in — passing your own value for it is silently ignored. All other props pass straight through to the parent construct.

Usage

import * as path from "node:path";
import {
  DnsValidatedCertificate,
  GitHubOidcRole,
  PythonFunction,
  SecureBucket,
  SecureTable,
  UvLayer,
} from "@layertwo/cdk-constructs";
import { HostedZone } from "aws-cdk-lib/aws-route53";

// S3: public access blocked, encrypted, SSL-only, versioned
const bucket = new SecureBucket(this, "Assets");

// DynamoDB: on-demand + PITR
const table = new SecureTable(this, "Sessions", {
  partitionKey: { name: "id", type: dynamodb.AttributeType.STRING },
});

// IAM role for a GitHub Actions workflow on main
const deployRole = new GitHubOidcRole(this, "DeployRole", {
  owner: "layertwo",
  repo: "my-app",
  branch: "main",
});

// ACM certificate validated via Route53
new DnsValidatedCertificate(this, "Cert", {
  domainName: "example.com",
  hostedZone: HostedZone.fromLookup(this, "Zone", {
    domainName: "example.com",
  }),
});

// Python Lambda from a uv project (built in Docker at synth time)
new PythonFunction(this, "Fetcher", {
  rootDir: path.join(__dirname, "../services/fetcher"),
  index: "src/entrypoint/__init__.py",
  handler: "handle_event",
  environment: { TABLE_NAME: table.tableName },
});
Python bundling and caching

PythonFunction builds inside AWS's SAM build image for the Python version, so it needs Docker at synth time. The image ships uv and a C toolchain, and its glibc matches Lambda. The asset is fingerprinted from the project source — uv.lock changes rebuild it, caches and .venv do not.

Two things make that fast in CI:

# Skip bundling entirely when the source hash matches a previous run.
- uses: actions/cache@v4
  with:
    path: cdk.out
    key: cdk-assets-${{ github.sha }}
    restore-keys: cdk-assets-

# Cache the image layers; type=gha needs BuildKit, and fails on a plain local daemon.
- uses: docker/setup-buildx-action@v3
const cacheScope = "lambda-bundling";
new PythonFunction(this, "Fetcher", {
  rootDir,
  bundling: process.env.CI
    ? {
        cacheFrom: [{ type: "gha", params: { scope: cacheScope } }],
        cacheTo: { type: "gha", params: { mode: "max", scope: cacheScope } },
      }
    : {},
});

The default image is AWS's SAM build image for the selected Python version, so dependencies that need a C toolchain build normally. Pass bundling.image to use your own build image.

Python layers

UvLayer packages a project's third-party dependencies into a layer at /opt/python. It uses the same bundling engine and defaults as PythonFunction; pass it through the function's layers prop. A layer is built for one runtime and architecture, so keep them aligned with the functions that use it.

PythonFunction still installs its own project's dependencies into the function package, so the layer only saves space when the function's project holds app code and no runtime dependencies. Put the dependencies in the layer's project, or share one layer across functions.

const deps = new UvLayer(this, "Deps", {
  rootDir: path.join(__dirname, "../layers/deps"),
});

new PythonFunction(this, "Fetcher", {
  rootDir: path.join(__dirname, "../services/fetcher"),
  layers: [deps],
});

Development

This project uses Projen for configuration and build management. Configuration lives in .projenrc.ts.

Setup
yarn install
npx projen          # regenerate project files from .projenrc.ts

Node.js 22 or 24 (the versions jsii supports). Dependency upgrades arrive as Renovate PRs — there is no local upgrade task.

Common commands
npm run build       # full build: compile (jsii) + test + package
npm run compile     # compile TypeScript only
npm test            # tests with coverage
npm run test:watch  # tests in watch mode
npm run eslint      # linter
npm run package     # generate distributable packages
npx projen          # re-synthesize generated files
Making changes
  1. Add the construct in src/ and export it from src/index.ts.
  2. Add a matching test/<name>.test.ts using CDK assertions.
  3. Run npm run build.
  4. For build/config changes, edit .projenrc.ts and run npx projen.

Do not edit files marked ~~ Generated by projen — change .projenrc.ts and regenerate instead.

Technology Stack

  • Language: TypeScript 5.9
  • Framework: AWS CDK 2.275.0
  • Testing: Jest 30 with ts-jest and CDK assertions
  • Linting: ESLint 9 + Prettier
  • Publishing: JSII

Contributing

Ensure npm run build passes before opening a PR. Commits on mainline follow conventional commits; the release workflow bumps the version and publishes.

License

Apache-2.0

Author

Lucas Messenger (1335960+layertwo@users.noreply.github.com)

Repository

https://github.com/layertwo/cdk-constructs

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @layertwo/cdk-constructs

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Frame 2085668439 (1)
Group 1261154229