Python Lambda Function Testing Container (AMD64/ARM64)
795
This Docker container provides an environment for testing Python Lambda functions, including security testing.
docker build -t setswei/python-lambda-testing .
docker run --rm -v /path/to/your/project:/app setswei/python-lambda-testing
Add this to your Makefile:
test-lambda:
@echo "Running Lambda tests with Docker..."
@docker run --rm -v $(PWD):/app setswei/python-lambda-testing
You can customize the test execution by modifying the run_tests.sh script. For example, you can:
Bandit is a tool designed to find common security issues in Python code. It scans the codebase for patterns that might indicate security vulnerabilities.
The pipeline is configured to:
-ll HIGH flag to set this thresholdSafety checks your installed dependencies for known security vulnerabilities. It uses the Python Safety DB, which is a curated database of Python package vulnerabilities.
The pipeline is configured to:
Pylint is a static code analysis tool that looks for programming errors, helps enforce a coding standard, and sniffs for code smells.
Flake8 is a wrapper around PyFlakes, pycodestyle, and McCabe complexity. It checks for PEP 8 compliance and programming errors.
Black is an uncompromising code formatter. It reformats entire files in place, making code review easier and reducing the time spent on code formatting discussions.
Content type
Image
Digest
sha256:49732514d…
Size
102.8 MB
Last updated
about 1 year ago
docker pull setswei/python-lambda-function-tests