Skip to content

Conversation

architec
Copy link
Contributor

Amazon Bedrock AgentCore Samples Pull Request

Instructions

  • Do not erase any parts of this template that are not applicable to your pull request.
  • If a section is not applicable, explicitly state the reason.
    • Tick the checkboxes for the items you have completed.
  • These are mandatory requirements, not mere suggestions.

Describe your changes

  • Changes to 02-use-cases/AWS-operations-agent/agent-lambda for adding the missing Dockerfile

Issue ticket number and link


All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Are you uploading a dataset?
  • Have you added contributions to RELEASE NOTES?

New Example Submissions:

  • Have you tested your code, and made sure the functionality runs successfully? Provide screenshots.
  • Have you linted your Python code with black?
  • Have you documented Introduction, Architecture Diagram, Prerequisites, Usage, Sample Prompts, and Clean Up steps in your example README?
  • I agree to resolve any issues created for this example in the future.

@architec architec changed the title Add missing Dockerfile at 02-use-cases/AWS-operations-agent/agent-lambda fix(AWS-operations-agent): Add missing Dockerfile at 02-use-cases/AWS-operations-agent/agent-lambda Jul 23, 2025
@akshseh akshseh self-assigned this Jul 23, 2025
@EashanKaushik EashanKaushik added 02-use-cases 02-use-cases AWS-operations-agent 02-use-cases/AWS-operations-agent labels Aug 25, 2025
@EashanKaushik EashanKaushik reopened this Sep 4, 2025
Copy link

github-actions bot commented Sep 4, 2025

Latest scan for commit: b6629dc | Updated: 2025-09-04 17:37:33 UTC

Security Scan Results

Scan Metadata

  • Project: ASH
  • Scan executed: 2025-09-04T17:37:21+00:00
  • ASH version: 3.0.0

Summary

Scanner Results

The table below shows findings by scanner, with status based on severity thresholds and dependencies:

Column Explanations:

Severity Levels (S/C/H/M/L/I):

  • Suppressed (S): Security findings that have been explicitly suppressed/ignored and don't affect the scanner's pass/fail status
  • Critical (C): The most severe security vulnerabilities requiring immediate remediation (e.g., SQL injection, remote code execution)
  • High (H): Serious security vulnerabilities that should be addressed promptly (e.g., authentication bypasses, privilege escalation)
  • Medium (M): Moderate security risks that should be addressed in normal development cycles (e.g., weak encryption, input validation issues)
  • Low (L): Minor security concerns with limited impact (e.g., information disclosure, weak recommendations)
  • Info (I): Informational findings for awareness with minimal security risk (e.g., code quality suggestions, best practice recommendations)

Other Columns:

  • Time: Duration taken by each scanner to complete its analysis
  • Action: Total number of actionable findings at or above the configured severity threshold that require attention

Scanner Results:

  • PASSED: Scanner found no security issues at or above the configured severity threshold - code is clean for this scanner
  • FAILED: Scanner found security vulnerabilities at or above the threshold that require attention and remediation
  • MISSING: Scanner could not run because required dependencies/tools are not installed or available
  • SKIPPED: Scanner was intentionally disabled or excluded from this scan
  • ERROR: Scanner encountered an execution error and could not complete successfully

Severity Thresholds (Thresh Column):

  • CRITICAL: Only Critical severity findings cause scanner to fail
  • HIGH: High and Critical severity findings cause scanner to fail
  • MEDIUM (MED): Medium, High, and Critical severity findings cause scanner to fail
  • LOW: Low, Medium, High, and Critical severity findings cause scanner to fail
  • ALL: Any finding of any severity level causes scanner to fail

Threshold Source: Values in parentheses indicate where the threshold is configured:

  • (g) = global: Set in the global_settings section of ASH configuration
  • (c) = config: Set in the individual scanner configuration section
  • (s) = scanner: Default threshold built into the scanner itself

Statistics calculation:

  • All statistics are calculated from the final aggregated SARIF report
  • Suppressed findings are counted separately and do not contribute to actionable findings
  • Scanner status is determined by comparing actionable findings to the threshold
Scanner S C H M L I Time Action Result Thresh
bandit 0 0 0 0 0 0 592ms 0 PASSED MED (g)
cdk-nag 0 0 0 0 0 0 24.5s 0 PASSED MED (g)
cfn-nag 0 0 0 0 0 0 8ms 0 PASSED MED (g)
checkov 0 2 0 0 0 0 4.2s 2 FAILED MED (g)
detect-secrets 0 0 0 0 0 0 568ms 0 PASSED MED (g)
grype 0 0 0 0 0 0 <1ms 0 ERROR MED (g)
npm-audit 0 0 0 0 0 0 170ms 0 PASSED MED (g)
opengrep 0 0 0 0 0 0 <1ms 0 SKIPPED MED (g)
semgrep 0 1 0 0 0 0 12.2s 1 FAILED MED (g)
syft 0 0 0 0 0 0 2.2s 0 PASSED MED (g)

Detailed Findings

Show 3 actionable findings

Finding 1: CKV_DOCKER_2

  • Severity: HIGH
  • Scanner: checkov
  • Rule ID: CKV_DOCKER_2
  • Location: 02-use-cases/AWS-operations-agent/agent-lambda/Dockerfile:1-17

Description:
Ensure that HEALTHCHECK instructions have been added to container images

Code Snippet:

FROM public.ecr.aws/docker/library/python:3.11-slim-bullseye

# Install Lambda Web Adapter as extension
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.9.1 /lambda-adapter /opt/extensions/lambda-adapter

# Set working directory
WORKDIR /app

# Copy requirements and install dependencies
COPY src/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY src/ .

# Run Python directly (not as Lambda handler)
CMD ["python", "main.py"]

Finding 2: CKV_DOCKER_3

  • Severity: HIGH
  • Scanner: checkov
  • Rule ID: CKV_DOCKER_3
  • Location: 02-use-cases/AWS-operations-agent/agent-lambda/Dockerfile:1-17

Description:
Ensure that a user for the container has been created

Code Snippet:

FROM public.ecr.aws/docker/library/python:3.11-slim-bullseye

# Install Lambda Web Adapter as extension
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.9.1 /lambda-adapter /opt/extensions/lambda-adapter

# Set working directory
WORKDIR /app

# Copy requirements and install dependencies
COPY src/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY src/ .

# Run Python directly (not as Lambda handler)
CMD ["python", "main.py"]

Finding 3: dockerfile.security.missing-user.missing-user

  • Severity: HIGH
  • Scanner: semgrep
  • Rule ID: dockerfile.security.missing-user.missing-user
  • Location: 02-use-cases/AWS-operations-agent/agent-lambda/Dockerfile:17

Description:
By not specifying a USER, a program in the container may run as 'root'. This is a security hazard. If an attacker can control a process running as root, they may have control over the container. Ensure that the last USER in a Dockerfile is a USER other than 'root'.

Code Snippet:

CMD ["python", "main.py"]

Report generated by Automated Security Helper (ASH) at 2025-09-04T17:37:15+00:00

@architec architec closed this by deleting the head repository Sep 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

02-use-cases 02-use-cases AWS-operations-agent 02-use-cases/AWS-operations-agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants