Skip to main content

Wilma - AWS Bedrock Security Posture Assessment

Project description

Wilma - AWS Bedrock Security Posture Assessment

PyPI version License: GPL v3 Python 3.9+ Security Audit OWASP AWS Tests Publish OSSF Scorecard

Wilma Logo

Wilma evaluates the security posture of an AWS Bedrock deployment and answers the practical audit question:

Are you using AWS Bedrock securely?

Wilma 0.2.0 is a beta reboot. The old public 1.x line should be treated as legacy pre-reboot history. The current direction is an auditor-friendly Bedrock posture assessment with evidence-backed findings, scorecards, framework mappings, and clear blind spots.

Wilma helps assess security posture. It does not certify compliance.

What Wilma Produces

  • Bedrock Security Posture Score, scored from 0-100
  • Assessment Confidence, showing how complete Wilma's automated visibility was
  • Bedrock Security Indicators scorecard
  • Prioritized findings with evidence, affected resources, and remediation guidance
  • Framework mappings for OWASP LLM Top 10, NIST AI RMF, NIST 800-53, AWS Bedrock guidance, and AIUC-1
  • Manual evidence checklist for policies, reviews, testing records, and other artifacts AWS APIs cannot prove
  • Versioned JSON schema for CI, dashboards, and GRC ingestion

Bedrock Security Indicators

Wilma groups checks into eight Bedrock Security Indicators:

  1. Governance & Inventory
  2. Identity, Access & Agency Control
  3. Data Protection & Privacy
  4. AI Safety & Guardrails
  5. RAG & Model Integrity
  6. Monitoring, Logging & Detection
  7. Network & Runtime Isolation
  8. Resilience & Consumption Controls

Each indicator maps to one or more external frameworks underneath the Wilma scorecard. The top-level scorecard stays Bedrock-native; the evidence remains framework-traceable.

Current Automated Coverage

Wilma currently includes checks for:

  • Bedrock Agents security: action confirmation, guardrails, service roles, Lambda action groups, memory, logging, tags, PII, prompt injection patterns, and knowledge base access
  • Guardrails security: filter strength, content coverage, PII filters, denied topics, word filters, KMS, versioning, tags, contextual grounding, and coverage
  • Knowledge Bases and RAG: S3 public access, encryption, versioning, vector store security, PII, prompt injection patterns, IAM, logging, tagging, chunking, and embedding model access
  • Fine-tuning and custom models: training data storage, PII, replay risk, VPC isolation, job logging, output encryption, access logging, IAM roles, tags, source validation, and model documentation
  • Foundational AWS controls: IAM, model access, invocation logging, VPC endpoints, resource tagging, data privacy, and cost anomaly detection

2026 AI Security Framework Alignment

Wilma maps automated evidence to both OWASP Top 10 for LLM Applications and the newer OWASP Agentic Application risk model. Agent, tool, memory, RAG, identity, and runtime checks are traced to agentic risks such as goal hijack, tool misuse, identity and privilege abuse, memory/context poisoning, insecure inter-agent communication, cascading failures, and rogue-agent behavior. Wilma still reports a Bedrock-native scorecard first, then exposes framework mappings for audit and GRC workflows.

Installation

Install from source during the 0.2.x reboot:

git clone https://github.com/ethanolivertroy/wilma.git
cd wilma
pip install -e ".[dev]"
wilma --explain

The package name remains wilma-sec and the CLI command remains wilma. If old 1.x releases still exist on PyPI, pin the reboot version explicitly once it is published:

pip install wilma-sec==0.2.0

Usage

# Run the default Bedrock posture assessment
wilma

# Explain the scoring, indicators, and framework model
wilma --explain

# Compatibility alias for --explain
wilma --learn

# Fun local terminal presentation mode
wilma --yabba-dabba-doo

# JSON output for CI, dashboards, or GRC ingestion
wilma --output json

# Use a specific AWS profile or region
wilma --profile production --region us-west-2

# Run selected automated check modules
wilma --checks agents,guardrails,knowledge_bases,iam

# Save output to a file
wilma --output json --output-file wilma-assessment.json

# Show the installed Wilma version
wilma --version

--yabba-dabba-doo changes terminal presentation only. It does not change checks, evidence, JSON semantics, scoring, or exit codes.

Library Usage

Security tools can embed Wilma without invoking the CLI:

from wilma import WilmaScanner

result = WilmaScanner(profile="production", region="us-west-2").scan()
assessment = result.assessment
findings = result.findings

The library API raises Wilma exceptions instead of calling sys.exit(), making it safe to use from orchestrators, CI systems, and other security platforms.

AWS Permissions

Wilma needs read-oriented access to Bedrock and related AWS services. Start with least privilege and add permissions as blind spots appear in the Assessment Confidence section.

Example baseline:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "bedrock:List*",
        "bedrock:Get*",
        "bedrock:Describe*",
        "iam:List*",
        "iam:Get*",
        "lambda:Get*",
        "lambda:List*",
        "cloudtrail:DescribeTrails",
        "cloudtrail:GetEventSelectors",
        "logs:DescribeLogGroups",
        "logs:DescribeLogStreams",
        "ec2:DescribeVpcEndpoints",
        "ec2:DescribeSecurityGroups",
        "s3:GetBucketEncryption",
        "s3:GetBucketVersioning",
        "s3:GetBucketPublicAccessBlock",
        "s3:GetBucketPolicyStatus",
        "sts:GetCallerIdentity"
      ],
      "Resource": "*"
    }
  ]
}

Output Model

JSON output uses a versioned assessment schema:

{
  "schema_version": "2.0",
  "assessment_type": "bedrock_security_posture",
  "posture_score": {
    "score": 85,
    "rating": "Needs Improvement"
  },
  "assessment_confidence": {
    "score": 88,
    "rating": "High"
  },
  "bedrock_security_indicators": [],
  "findings": [],
  "manual_evidence_needed": []
}

The report keeps legacy-friendly top-level fields such as summary, findings, good_practices, and available_models, while enriching findings with indicator, evidence, and framework mapping fields.

Exit Codes

  • 0: No high or critical findings
  • 1: One or more high findings
  • 2: One or more critical findings
  • 3: Runtime error, missing AWS credentials, interruption, or unexpected failure

Development

pip install -e ".[dev]"
pytest tests/
ruff check src/ tests/
bandit -r src/ -s B101,B106,B107,B112,B601
mypy src/wilma --show-error-codes --pretty

The project uses mocked AWS clients in tests. No real AWS credentials are required for the test suite. Mypy is currently informational while type hints are tightened; CI does not block on it.

Release Notes

0.2.0 is the reboot foundation:

  • Resets the project identity to beta posture assessment
  • Introduces Bedrock Security Indicators
  • Adds posture score and assessment confidence
  • Adds versioned JSON assessment schema
  • Adds manual evidence checklist
  • Adds --explain as the auditor-oriented explanation mode
  • Keeps --learn as a compatibility alias
  • Adds terminal-only --yabba-dabba-doo presentation mode
  • Fixes aggregation so newer check-module findings appear in the main report

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wilma_sec-0.2.1.tar.gz (110.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wilma_sec-0.2.1-py3-none-any.whl (115.6 kB view details)

Uploaded Python 3

File details

Details for the file wilma_sec-0.2.1.tar.gz.

File metadata

  • Download URL: wilma_sec-0.2.1.tar.gz
  • Upload date:
  • Size: 110.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for wilma_sec-0.2.1.tar.gz
Algorithm Hash digest
SHA256 6183982ca6161d6c9636d0dacfb95f4286b699d79e227b66cfeced3fb3f6b719
MD5 59608a7a94a289188e48b129c24bc5b9
BLAKE2b-256 5c234ef09fd2fc376bf4c7275460e60eac5cc9d0c727d2638635fd3a0d45cb77

See more details on using hashes here.

File details

Details for the file wilma_sec-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: wilma_sec-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 115.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for wilma_sec-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ca0bc9c00bd070effb69087f75abb1cf617f619c09612ca089c7869b9f1a4352
MD5 241017bd37a6d1cc8c12362a9807cdb7
BLAKE2b-256 b8250fc5a07bd2020a0f10de425fd74a25438fb582f13d6f8847733424067a96

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page