Skip to content

Commit b549e70

Browse files
committed
Address some security hotspots
1 parent 63e71eb commit b549e70

File tree

14 files changed

+310
-284
lines changed

14 files changed

+310
-284
lines changed

backend/docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ WORKDIR /home/owasp
1616

1717
USER owasp
1818

19-
COPY --chown=owasp:owasp poetry.lock pyproject.toml ./
19+
COPY --chmod=644 --chown=owasp:owasp poetry.lock pyproject.toml ./
2020
RUN poetry install --no-root --without dev --without test
2121

2222
COPY apps apps
@@ -41,7 +41,7 @@ ENV PATH="/home/owasp/.venv/bin:$PATH" \
4141

4242
WORKDIR /home/owasp
4343

44-
COPY --from=builder --chown=owasp:owasp /home/owasp /home/owasp
44+
COPY --from=builder --chmod=755 --chown=owasp:owasp /home/owasp /home/owasp
4545
RUN chmod +x /home/owasp/entrypoint.sh
4646

4747
USER owasp

backend/docker/Dockerfile.local

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ENV POETRY_VIRTUALENVS_IN_PROJECT=true \
1515
USER owasp
1616
WORKDIR /home/owasp
1717

18-
COPY --chown=owasp:owasp poetry.lock pyproject.toml ./
18+
COPY --chmod=644 --chown=owasp:owasp poetry.lock pyproject.toml ./
1919
RUN poetry install --no-root --without dev --without test
2020

2121
FROM python:3.13-slim
@@ -37,4 +37,4 @@ EXPOSE 8000
3737
USER owasp
3838
WORKDIR /home/owasp
3939

40-
COPY --from=builder /home/owasp /home/owasp
40+
COPY --from=builder --chmod=755 --chown=owasp:owasp /home/owasp /home/owasp

backend/docker/Dockerfile.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ENV FORCE_COLOR=1 \
1616
WORKDIR /home/owasp
1717
USER owasp
1818

19-
COPY poetry.lock pyproject.toml ./
19+
COPY --chmod=644 poetry.lock pyproject.toml ./
2020
RUN poetry install --no-root
2121

2222
COPY .env.example .env.example
@@ -44,4 +44,4 @@ ENV FORCE_COLOR=1 \
4444
WORKDIR /home/owasp
4545
USER owasp
4646

47-
COPY --from=builder /home/owasp /home/owasp
47+
COPY --from=builder --chmod=755 --chown=owasp:owasp /home/owasp /home/owasp

backend/poetry.lock

Lines changed: 132 additions & 117 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/docker/Dockerfile.local

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ENV FORCE_COLOR=1 \
1616
WORKDIR /home/owasp
1717
USER owasp
1818

19-
COPY --chown=owasp:owasp docs/poetry.lock docs/pyproject.toml mkdocs.yaml ./
19+
COPY --chmod=644 --chown=owasp:owasp docs/poetry.lock docs/pyproject.toml mkdocs.yaml ./
2020
RUN poetry install --no-root && \
2121
rm -rf docs/poetry.lock docs/pyproject.toml
2222

@@ -38,4 +38,4 @@ EXPOSE 8001
3838
USER owasp
3939
WORKDIR /home/owasp
4040

41-
COPY --from=builder /home/owasp /home/owasp
41+
COPY --from=builder --chmod=755 --chown=owasp:owasp /home/owasp /home/owasp

frontend/docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM node:22 AS builder
22

33
WORKDIR /app
44

5-
COPY package.json pnpm-lock.yaml ./
5+
COPY --chmod=644 package.json pnpm-lock.yaml ./
66
RUN npm install -g pnpm && \
77
pnpm install
88

@@ -12,7 +12,7 @@ RUN pnpm run build
1212

1313
FROM nginx:stable-alpine
1414

15-
COPY --from=builder /app/dist /usr/share/nginx/html
15+
COPY --from=builder --chmod=755 /app/dist /usr/share/nginx/html
1616
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
1717
RUN chmod -R a-w /usr/share/nginx/html
1818

frontend/docker/Dockerfile.e2e.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ENV FORCE_COLOR=1
66

77
WORKDIR /app
88

9-
COPY package.json pnpm-lock.yaml ./
9+
COPY --chmod=644 package.json pnpm-lock.yaml ./
1010
RUN npm install -g pnpm && \
1111
pnpm install
1212

frontend/docker/Dockerfile.local

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends && \
1010

1111
WORKDIR /home/owasp
1212

13-
COPY package.json pnpm-lock.yaml ./
13+
COPY --chmod=644 --chown=node:node package.json pnpm-lock.yaml ./
1414
RUN pnpm config set store-dir /home/owasp/.local/share/pnpm/store/v10 --global && \
1515
pnpm install
1616

@@ -24,7 +24,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends && \
2424
chown -R node:node /home/owasp && \
2525
npm install -g pnpm
2626

27-
COPY --from=builder --chown=node:node /home/owasp/node_modules /home/owasp/node_modules
27+
COPY --from=builder --chmod=755 --chown=node:node /home/owasp/node_modules /home/owasp/node_modules
2828

2929
EXPOSE 3000
3030

frontend/docker/Dockerfile.unit.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ENV FORCE_COLOR=1
66

77
WORKDIR /app
88

9-
COPY package.json pnpm-lock.yaml ./
9+
COPY --chmod=644 package.json pnpm-lock.yaml ./
1010
RUN npm install -g pnpm && \
1111
pnpm install
1212

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@fortawesome/free-solid-svg-icons": "^6.7.2",
3030
"@fortawesome/react-fontawesome": "^0.2.2",
3131
"@radix-ui/react-dropdown-menu": "^2.1.6",
32-
"@sentry/react": "^9.9.0",
32+
"@sentry/react": "^9.10.0",
3333
"@testing-library/user-event": "^14.6.1",
3434
"@types/lodash": "^4.17.16",
3535
"class-variance-authority": "^0.7.1",

0 commit comments

Comments
 (0)