Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM python:3.10.17-alpine3.20
FROM python:3.14-alpine

Check warning on line 1 in Dockerfile

View check run for this annotation

Orca Security (US) / Orca Security - Infrastructure as Code

[LOW] HEALTHCHECK Instruction Missing

Details: Containers without health checks cannot automatically restart upon failure, reducing service reliability and potentially leaving unresponsive containers running. Health checks enable orchestration platforms to detect and remediate failed containers. Configure a HEALTHCHECK instruction to monitor container health status. Recommendation: Dockerfile should contain instruction 'HEALTHCHECK'

Check warning on line 1 in Dockerfile

View check run for this annotation

Orca Security (US) / Orca Security - Infrastructure as Code

[MEDIUM] Dockerfile Missing USER Instruction

Details: Container images without a specified user instruction run as root by default, granting unnecessary elevated privileges that increase the impact of potential container escape vulnerabilities. Running as root violates the principle of least privilege and expands the attack surface. Specify a non-root user to minimize privilege escalation risks. Recommendation: The 'Dockerfile' should contain the 'USER' instruction

RUN mkdir -p /workspace/python-lambda-powertools

WORKDIR /workspace/python-lambda-powertools

ADD lambda_powertools ./lambda_powertools
ADD tests ./tests
COPY lambda_powertools ./lambda_powertools
COPY tests ./tests

ADD setup.py ./
COPY pyproject.toml ./

RUN pip install . --no-cache-dir
RUN pip install ".[dev]" --no-cache-dir
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@ docker compose build && docker compose run dev sh
To run the tests:

```bash
python setup.py pytest
pytest
```

## Releasing

To install the package locally, for inter-project usage, set the proper version in the file path and run:
To install the package locally, for inter-project usage, run:

```bash
python setup.py bdist_wheel

pip install ./dist/lambda_powertools-0.2.0-py3-none-any.whl --force-reinstall
pip install . --force-reinstall
```

## Components
Expand Down
24 changes: 23 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"

[project]
name = "lambda_powertools"
version = "0.3.0"
description = "Lambda Powertools is a package encapsulating utilities and best practices used to write Python Lambda functions at Spreaker."
authors = [{ name = "Spreaker" }]
license = { text = "MIT" }
dependencies = [
"prometheus-client==0.25.0"
]
[project.optional-dependencies]
dev = [
"pytest==8.3.5",
"pytest-mock==3.15.1",
]

[tool.setuptools.packages.find]
include = ["lambda_powertools"]

[tool.pytest.ini_options]
pythonpath = "lambda_powertools"
testpaths = [
"tests"
]
]
13 changes: 0 additions & 13 deletions setup.py

This file was deleted.