Skip to content

fix(aws-serverless-mcp-server): input validation for startup script generator parameters#2854

Merged
bx9900 merged 2 commits intoawslabs:mainfrom
Vandita2020:ops
Apr 7, 2026
Merged

fix(aws-serverless-mcp-server): input validation for startup script generator parameters#2854
bx9900 merged 2 commits intoawslabs:mainfrom
Vandita2020:ops

Conversation

@Vandita2020
Copy link
Copy Markdown
Member

Summary

Defense-in-depth: Add input validation for entry_point and additional_env parameters in startup script generator. Added allowlist regex validation for entry_point and shlex.quote() escaping for environment variable values in generated startup scripts. Testing confirmed that arbitrary code execution is not achievable through the intended MCP client interface.

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • I have reviewed the contributing guidelines
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented

Is this a breaking change? (Y/N)
N

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.38%. Comparing base (9480a33) to head (39acec9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2854   +/-   ##
=======================================
  Coverage   91.37%   91.38%           
=======================================
  Files        1014     1014           
  Lines       74953    74973   +20     
  Branches    12047    12053    +6     
=======================================
+ Hits        68491    68511   +20     
  Misses       3990     3990           
  Partials     2472     2472           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Vandita2020 Vandita2020 changed the title input validation for startup script generator parameters fix: input validation for startup script generator parameters Apr 2, 2026
@Vandita2020 Vandita2020 changed the title fix: input validation for startup script generator parameters fix(aws-serverless-mcp-server): input validation for startup script generator parameters Apr 2, 2026
@Vandita2020 Vandita2020 force-pushed the ops branch 2 times, most recently from d6ebd58 to d7eab32 Compare April 2, 2026 21:29
Copy link
Copy Markdown
Contributor

@theagenticguy theagenticguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bx9900 bx9900 added this pull request to the merge queue Apr 7, 2026
Merged via the queue into awslabs:main with commit 46894ec Apr 7, 2026
147 checks passed
@github-project-automation github-project-automation bot moved this from To triage to Done in awslabs/mcp Project Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants