alexa-games / skill-flow-builder

Development suite that helps you create narrative-driven Alexa skills, including a GUI editor and CLI
Other
69 stars 17 forks source link

feat: Added input sanitization to exec/spawn calls #28

Closed anfazio closed 3 years ago

anfazio commented 3 years ago

Added input sanitization to exec/spawn calls

Description

Added sanitizeCommandLineParameter utility function to remove invalid characters from command line parameter values, and applied it to existing exec/spawn calls.

Motivation and Context

While all the parameter values are either programmatically generated or provided through user configurations, it is a security best practice to sanitize inputs into command line calls. This will provide additional security if dependencies are compromised or an attacker modifies the SFB configuration.

Testing

Tested the following E2E scenarios:

  1. Deploy skill with lambda layer enabled/disabled
  2. Deploy skill with polly enabled/disabled
  3. Run through voice preview of tutorial story in editor

Types of changes

Checklist

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