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

tf-eu-guard

Latest version: v0.9.0

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
PyPI package Publisher: 44aayush
1 Stars
0 Forks
6 Versions
268 Downloads
Python Repo language

Scan summary

tf-eu-guard was last scanned on 23 Nov 2026 at version 0.9.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 6 versions; the latest 2 were published within 7 days (17–23 Nov 2026).
  • Findings: No rules fired in version 0.9.0.
  • Downloads: 268 downloads.

Versions

6 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.9.0 LATEST 23 Nov 2026 No rules fired
0.8.1 17 Nov 2026 No rules fired
0.7.1 7 Nov 2026 No rules fired
0.7.0 18 Oct 2026 Not shown
0.6.0 17 Oct 2026 Not shown

No rules fired in 0.9.0

Findings

Findings for v0.9.0. 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.9.0; other versions have their own rules, not their own score.

README

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

tf-eu-guard — NIS2/GDPR compliance scanner for Terraform and Kubernetes

CI PyPI Python 3.11+ Checkov 3.4.5 License: MIT Mappings

Links: PyPI package · Documentation · Changelog

EU compliance security linter for infrastructure as code (IaC). It scans Terraform source, Terraform plan JSON, and Kubernetes manifests with Checkov, then maps infrastructure misconfigurations to NIS2 (Directive 2022/2555) and GDPR (Regulation 2016/679) requirements. It is built for Terraform security scanning, Kubernetes compliance checks, DevSecOps pipelines, GitHub Actions, SARIF, and audit preparation.


Problem

The NIS2 Directive set October 17, 2024 as the deadline for Member States to adopt and publish national transposition measures; applicability and enforcement still depend on national law and whether an entity is in scope. Article 21(2) mandates risk-management measures including access control, encryption, incident handling, backup policies, and secure authentication. GDPR Article 32 imposes similar technical and organizational safeguards for processing personal data.

Most organizations scan infrastructure-as-code with tools like Checkov or tfsec, but the output is generic security findings, not compliance mappings. Security teams must manually trace each finding to the relevant NIS2 or GDPR article, a slow and error-prone process that blocks audit preparation.

tf-eu-guard wraps Checkov, enriches each failed check with the relevant NIS2/GDPR article references, and produces reports structured for developers, security engineers, and auditors.


What It Does

  1. Scans IaC using Checkov — Terraform source, Terraform plan JSON (terraform show -json), and Kubernetes manifests (--iac-type)
  2. Enriches findings with NIS2 Article 21(2), GDPR Article 32(1) / 44, and the project's region residency policy mappings from a curated registry
  3. Reports mapped and unmapped findings separately — Checkov failures with no current EU mapping are surfaced as counts in terminal/HTML reports, a stderr note beside JSON, and full note-level SARIF results, never silently dropped; see Unmapped findings
  4. Generates three report formats from one scan:
    • Dev report (terminal/HTML): severity-sorted findings for engineers
    • Security dashboard (HTML): CRITICAL/HIGH/MEDIUM/LOW breakdown with stats
    • Auditor report (HTML): article-by-article view showing which NIS2/GDPR clauses and project-policy controls have open findings
  5. Custom checks: Adds EU-specific rules (configurable region residency policy, third-country transfer review, and selected hardcoded secrets) not in upstream Checkov

Note on flags: --iac-type selects what to scan (terraform, terraform_plan, kubernetes); --framework selects which regulatory regime to report (nis2/gdpr). all also retains project-policy findings such as the EUSC sovereignty control. They are unrelated.


Quick Start

Installation

Requires Python ≥ 3.11. Installs Checkov 3.4.5 as a dependency. uv is optional; plain pip works too.

uv tool install tf-eu-guard

(Also available on PyPI: tf-eu-guard; with pip, pip install tf-eu-guard.)

For development (from a clone of this repo):

uv sync --extra dev        # or: python -m venv .venv && .venv/bin/pip install -e '.[dev]'

uv sync also writes a uv.lock in the repository root. It is a local artefact (the project's pinned locks are the requirements*.lock files), and it is gitignored, so do not commit it.

Basic Scan
# Scan a Terraform directory
tf-eu-guard scan ./terraform --output dev

# Generate all three HTML reports
tf-eu-guard scan ./terraform --output all

# Filter to GDPR-only findings and output JSON
tf-eu-guard scan ./terraform --output json --framework gdpr

# Markdown summary or CSV (one row per finding and article); also write a summary and counts
# file (key=value, GitHub $GITHUB_OUTPUT format) next to any other --output
tf-eu-guard scan ./terraform --output csv --output-file findings.csv
tf-eu-guard scan ./terraform --output json --summary-file summary.md --counts-file counts.txt

# Fail the build (exit code 1) on HIGH or worse findings — for CI/CD
tf-eu-guard scan ./terraform --fail-on-severity HIGH

# Skip paths (repeatable; Checkov --skip-path semantics: regex or substring of the absolute path)
tf-eu-guard scan . --exclude tests/fixtures --exclude vendor

# Show the registry entry (severity, articles, risk, remediation) for one check
tf-eu-guard explain CKV_AWS_16

# Layer your own registry entries over the bundled ones (repeatable; later wins), then lint them
tf-eu-guard scan ./terraform --registry-dir ./our-registry
tf-eu-guard registry validate ./our-registry

Network behaviour. Scans run Checkov with --skip-download, so no request is made to the Prisma Cloud platform and reports have no "Documentation" links. --online allows Checkov to fetch that metadata. BC_*, PRISMA_* and CKV_IGNORE* environment variables (platform API keys included) are always removed from Checkov's environment, even with --online. See docs/limitations.md and SECURITY.md.

Remote modules. Checkov does not download modules, so resources inside registry or Git modules are not analysed; a stderr warning lists such module calls, and CKV_TF_1/CKV_TF_2 (module pinning) map to NIS2 Art. 21(2)(d). --download-external-modules lets Checkov fetch them (network access, third-party code; Terraform source scans only). The GitHub Action runs with --network none, so that flag does not work there. --var-file FILE (repeatable) passes Terraform variable files so values such as a provider region set via var.* resolve.

Secrets. --secrets also runs Checkov's secrets framework (hard-coded credentials, CKV_SECRET_*, mapped to NIS2 Art. 21(2)(e) and GDPR Art. 32(1)(b), severity HIGH). It works with Terraform, Terraform plan, Kubernetes and --checkov-json (a secrets element in the file is merged; none means no secret findings). Reports show the secret type and file location only: the secret value, code excerpt and Checkov's hash of the secret are never copied into any output. Parsing errors in the secrets scan fail the run like any other.

Try it: Run tf-eu-guard scan examples/vulnerable-aws/ --output all to see ~53 mapped findings, or tf-eu-guard scan examples/compliant-aws/ --output dev to see zero mapped findings on the compliant fixture.

Scan Terraform Plan JSON

Plan-mode scanning catches the configuration as it will actually be applied. Generate the plan JSON, then scan it:

terraform plan -out=tfplan.binary
terraform show -json tfplan.binary > plan.json
tf-eu-guard scan plan.json --iac-type terraform_plan --output json

Plan mode runs Checkov against the plan file itself (checkov -f <plan.json> --framework terraform_plan). It reuses the same CKV_AWS_* check IDs as source mode (verified: a plan of examples/vulnerable-aws maps 31 findings, all to existing registry entries), minus lifecycle-block checks that plan JSON doesn't store. Findings report file_line_range: [0, 0] (the whole plan is one JSON line), so reports omit the line reference. A committed fixture lives at examples/vulnerable-aws-plan/.

Note: --checkov-json is a different feature — it reuses Checkov JSON output you already generated (see below). Passing a raw terraform show -json plan file to --checkov-json is an error; scan the plan file directly as shown above.

Scan Kubernetes
tf-eu-guard scan ./k8s --iac-type kubernetes --output all

Try it: tf-eu-guard scan examples/vulnerable-kubernetes/ --iac-type kubernetes --output json returns ~24 mapped findings across pod security context, RBAC, network policy, secrets and resource limits. Kubernetes checks live in the separate CKV_K8S_* namespace, mapped in registry-kubernetes.yaml.

Use Pre-Generated Checkov JSON

If you already run Checkov in CI or with custom checks, feed tf-eu-guard the Checkov output JSON directly (not a raw Terraform plan file; use --iac-type terraform_plan for that):

# From a file
checkov -d ./terraform --output json --framework terraform --quiet > checkov.json
tf-eu-guard scan --checkov-json checkov.json --output security

# From stdin
checkov -d ./terraform --output json --framework terraform --quiet \
  | tf-eu-guard scan --checkov-json - --output auditor

Limits of pre-generated JSON. tf-eu-guard cannot re-run what Checkov did, so it checks the file instead:

  • Parsing errors fail the scan. If summary.parsing_errors is above 0 (in any element of a multi-framework array), tf-eu-guard exits with the same runtime-failure code as a source scan, because unparsed files were never checked. --allow-partial downgrades this to a stderr warning in both modes.
  • Checkov version. If summary.checkov_version differs from the installed Checkov, a warning names both versions.
  • Custom checks. If no EUGUARD_* check ID appears in the passed, failed or skipped lists, a warning says the residency and secret checks were not loaded and a clean result does not cover them. Regenerate the file with checkov --external-checks-dir <tf_eu_guard>/checks (the warning prints the path).
  • The residency flags (--residency-policy, --allowed-regions) are ignored; the results reflect the policy in effect when Checkov ran.

Use --framework terraform in Checkov to get a single JSON object. tf-eu-guard also handles the multi-check-type array and extracts the terraform result automatically.

Checkov results must identify the requested IaC type when check_type is present. Arrays are accepted only when they contain a matching element. For compatibility, a single legacy object without check_type is interpreted as the requested type. Source scans fail closed on Checkov parsing errors and empty/unsupported directories; .tf.json source files are not supported by the selected Checkov framework (use Terraform HCL or scan a plan with --iac-type terraform_plan).

Symlink boundary: For a source-directory scan, tf-eu-guard resolves every symlink before Checkov runs. A symlinked file or directory that resolves outside the requested scan root (or a broken symlink) is rejected with exit code 2. Symlinks that resolve inside the scan root are allowed; Checkov scans their targets, and directory cycles are visited only once. Plan-file scans are not directory traversals and do not apply this source-root check.

Use as a Claude Code Skill

This repo includes a Claude Code skill at .claude/skills/tf-eu-guard/. In Claude Code:

/tf-eu-guard ./terraform

Or just ask: "Check my Terraform for NIS2 and GDPR compliance" — Claude runs the scan and summarizes findings by framework and severity.


Evidence bundle and provenance

--evidence-dir DIR writes dev.html, security.html, auditor.html, report.json (object format), report.sarif, summary.md and manifest.json into a new or empty DIR (otherwise exit 2), in addition to the normal --output. manifest.json holds created, provenance and the SHA-256 of every other file. provenance (also in the JSON object and the auditor report) has tool_version, checkov_version, registry_sha256 and registry_files (overlays by full path), commit (the HEAD sha; uncommitted changes are not detected; null outside git), the effective options (no environment variables), resources_scanned and checks (passed, failed, skipped). The python:3.12-slim image the Action runs in has no git, so provenance.commit is null in the Action.

To attest the bundle in CI, use GitHub artifact attestations on it, for example actions/attest-build-provenance with subject-path: evidence/*.

Documentation

  • Architecture and data flow — how Checkov findings become enriched compliance results
  • NIS2 mapping guide — Article 21(2) coverage and reasoning
  • GDPR mapping guide — Article 32 and Article 44 coverage
  • Regulatory coverage — automated, partial, manual, and out-of-scope requirements
  • Checkov mapping table — registry-backed check IDs, severity, risk, and remediation
  • Limitations — what an IaC scanner can and cannot establish
  • Demo walkthrough — reproducible vulnerable and compliant scans
  • Changelog — release history

Usage

Developer Scan

Quick terminal output for engineers fixing issues:

tf-eu-guard scan ./terraform --output dev

Dev report terminal output

Security Dashboard

HTML report with severity breakdown and compliance tags:

tf-eu-guard scan ./terraform --output security

Security dashboard

Live HTML version: docs/screenshots/scan-report.html

Auditor Compliance Matrix

Article-by-article view for audit preparation:

tf-eu-guard scan ./terraform --output auditor

Auditor report

Live HTML version: docs/screenshots/auditor-report.html

JSON (CI/CD & Tooling)

Machine-readable output for pipelines:

tf-eu-guard scan ./terraform --output json --framework nis2
SARIF (GitHub Code Scanning)
tf-eu-guard scan ./terraform --output sarif > tf-eu-guard.sarif

Emits a SARIF 2.1.0 document, the format GitHub Code Scanning ingests directly. Each finding becomes a result with ruleId = Checkov check ID, level derived from severity (CRITICAL/HIGH → error, MEDIUM → warning, LOW/INFO → note), and a physicalLocation from the finding's file and line range. For mapped findings, the registry-backed EU context (NIS2/GDPR articles, severity, and remediation) rides along in properties on both the rule and the result for other SARIF consumers; Code Scanning itself does not render those custom properties. What it does show: each rule's help (remediation and the article list), properties.tags (security, the framework, and article labels such as NIS2 Art. 21(2)(f), usable as filters), and properties.security-severity for ranking (CRITICAL 9.5, HIGH 8.0, MEDIUM 5.5, LOW 3.0, INFO 0.0; unmapped rules carry none and rank by level). Each result has a partialFingerprints["tfEuGuard/v1"] (sha256 of check ID, resource and repository-relative file) so alerts stay stable across runs. A finding whose file is outside the repository gets a file-level location at the repository root ("." under %SRCROOT%) instead of an empty locations array. Unmapped Checkov findings are included as note-level results with their Checkov identity, resource, and location, tagged properties.mapped: false; they carry no registry remediation or severity.

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).

  • pypi-releases tf-eu-guard

References

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

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

PHP2Shell, Day 5 93.6% of Measurable Instances Still Unpatched (1)
Vulnerability Insights

PHP2Shell, Day 5: The Panic Hasn’t Turned Into Patching

Frame 2085668439 (1)
Group 1261154229