Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

sbglasius/groovysandbox-aws-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Groovy Sandbox AWS Lambda

This is the AWS Lambda to execute abitrary Groovy Script code.

The main purpose is to provide a script execution endpoint for a Slack Groovy Bot.

To prevent malicious use, it utilizes the Groovy Sandbox.

It attempts to prevent access to:

  • instantiating packages outside java., javax. groovy. and spock.

  • accessing the Groovy metaClass

  • Running methods like System.exit(), System.getProperty('key'), System.setProperty('key','val'), Runtime.getCurrentRuntime(), "ls".execute() and more.

  • Prevent file system access via File, URL or URI methods

  • Prevent the usage of @Grab annotations

If other attack points can be found, please raise an issue.

Note: Since this will run in an AWS Lambda, the damage that can be done is limited, but reuse of the Lambda instance can occur, thus the attempted lock-down. See https://aws.amazon.com/blogs/compute/container-reuse-in-lambda/ for information.

About

Small AWS Lambda that executes Groovy in a sandboxed environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages