Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e4ec773
[updated] requirements.txt to fix dependencies conflicts
LuisDevLipe Feb 15, 2026
49ac141
[updated] Dockerfile
LuisDevLipe Feb 15, 2026
fc0b15b
Merge branch 'main' into fix/dependencies-conflict-and-dockerfile-ima…
LuisDevLipe Feb 15, 2026
7767d79
[added] Docker Scout action to Docker build action workflow file
LuisDevLipe Feb 15, 2026
8c5b7b3
[added] permissions and secrets
LuisDevLipe Feb 15, 2026
0b0e659
[testing] scout workflow cves and recommendations only
LuisDevLipe Feb 15, 2026
675f873
[testing] scout action cve only
LuisDevLipe Feb 15, 2026
94b15a4
[testing] docker scount quickview,compare commands
LuisDevLipe Feb 16, 2026
6b485a1
[testing/fix] docker scout reference image for compare
LuisDevLipe Feb 16, 2026
570d3eb
[testing/fix] docker scout reference image for compare
LuisDevLipe Feb 16, 2026
c9d85fa
[testing] docker scout quickview
LuisDevLipe Feb 16, 2026
8e3f5b5
[fixing/testing] docker scout quickview,compare,cves,recommendations …
LuisDevLipe Feb 16, 2026
74b463f
[fixing/testing] docker scout ...
LuisDevLipe Feb 16, 2026
f6c2498
[fixing/testing] docker scout ...
LuisDevLipe Feb 16, 2026
2df9a78
[fixing/testing] docker scout ...
LuisDevLipe Feb 16, 2026
c4a7d5d
[fixing/testing] docker scout ...
LuisDevLipe Feb 16, 2026
7479091
[fixing/testing] Docker scout....
LuisDevLipe Feb 16, 2026
41491b9
[fixing/testing] docker scout ghcr registry auth
LuisDevLipe Feb 16, 2026
745f760
[fixing] dokcer scout actoin ghcr permissions
LuisDevLipe Feb 16, 2026
f207975
[added] Docker scout step to publish in the pull request comments, in…
LuisDevLipe Feb 16, 2026
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
33 changes: 32 additions & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
pull-requests: write

steps:
- name: Checkout repository
Expand Down Expand Up @@ -82,6 +83,36 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# make sure to set to load, so the image is available locally for Docker Scout
load: ${{ github.event_name == 'pull_request' }}

# Run Docker Scout to check for vulnerabilities and get recommendations.
# For the latest built image, display:

# - the vulnerabilities (ignoring the base image, displaying
# all vulnerabilities with a fix available)
# - the available recommendations
# - compare it to the latest image indexed for the same repository (only
# displaying unchanged packages and vulnerabilities that already have a fix)

- name: Docker Scout
id: docker-scout
uses: docker/scout-action@v1
if: ${{ github.event_name == 'pull_request' }}
with:
command: quickview,compare,cves,recommendations
# the loaded image from the build
image: ${{ steps.meta.outputs.tags }}
# the latest image from the registry
to: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest

# Docker Hub credentials for Docker Scout
dockerhub-user: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN }}
# ghcr.io credentials for pulling the latest indexed image for comparison in Docker Scout
registry-user: ${{ github.actor }}
registry-password: ${{ secrets.GITHUB_TOKEN }}


# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
Expand All @@ -96,4 +127,4 @@ jobs:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
15 changes: 8 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
FROM python:3.13 AS builder
FROM python:3.13.5 AS builder
WORKDIR /app
COPY --chmod=0110 requirements.txt requirements.txt

RUN pip install --upgrade pip setuptools wheel
RUN pip install --no-cache-dir -r requirements.txt

FROM builder AS deps
# install curl with soar for health checks
RUN wget -qO- "https://raw.githubusercontent.com/pkgforge/soar/main/install.sh" | sh
RUN export PATH="$PATH:/usr/local/bin:/opt/soar/bin"
RUN soar install curl

RUN soar install curl

RUN pip install --no-cache-dir -r requirements.txt

FROM gcr.io/distroless/python3-debian13:debug-nonroot AS runtime
FROM gcr.io/distroless/python3-debian13:nonroot AS runtime
WORKDIR /

COPY --from=builder /usr/local/lib/python3.13/site-packages /usr/local/lib/python3.13/site-packages
Expand All @@ -22,7 +23,7 @@ COPY --chown=nonroot:nonroot --chmod=0550 ./app ./app

# bring curl to the runtime image for health checks
# r-- permissions for nonroot user.
COPY --from=builder --chown=nonroot:nonroot --chmod=0110 /root/.local/share/soar/bin/curl /usr/bin/curl
COPY --from=deps --chown=nonroot:nonroot --chmod=0110 /root/.local/share/soar/bin/curl /usr/bin/curl

HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
CMD [ "curl", "-f", "http://localhost:8080/" ]
Expand Down
22 changes: 11 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
annotated-types==0.6.0
anyio==4.6.2
click==8.1.8
fastapi==0.115.6
h11==0.14.0
httptools==0.6.1
idna==3.10
pydantic==2.10.3
pydantic_core==2.27.2
# annotated-types==0.6.0
# anyio==4.6.2
# click==8.1.8
# h11==0.14.0
# httptools==0.6.1
# idna==3.10
# pydantic==2.10.3
# pydantic_core==2.27.2
python-dotenv==1.0.1
starlette==0.41.0
typing_extensions==4.12.2
# starlette==0.41.0
# typing_extensions==4.12.2
uvicorn==0.32.1
uvloop==0.21.0
watchfiles==0.22.0
# watchfiles==0.22.0
Loading