Skip to content

Commit 96390e2

Browse files
Fix semgrep findings (#2061)
1 parent 1fb4a81 commit 96390e2

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.semgrepignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Ignore test and example files containing dummy credentials
2+
**/test/**/*.json
3+
**/tests/**/*.json
4+
**/SampleRequests/**/*.json
5+
**/*.example.*
6+
**/*.test.*
7+
**/*.min.js
8+
**/env.configs.yml
9+
10+
# Ignore third-party libraries
11+
**/node_modules/**
12+
**/vendor/**
13+
**/dist/**
14+
**/build/**
15+
**/bootstrap/**/*.js

LambdaRuntimeDockerfiles/sample/Sample/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ RUN dotnet publish "Sample.csproj" -c Release -o /app/publish
1717
FROM base AS final
1818
COPY --from=publish /app/publish ${LAMBDA_TASK_ROOT}
1919
# ref. https://docs.aws.amazon.com/lambda/latest/dg/csharp-handler.html#csharp-handler-signatures
20+
# Create a non-root user and switch to it
21+
RUN adduser --disabled-password --gecos "" appuser
22+
USER appuser
2023
CMD [ "Sample::Sample.Function::FunctionHandler" ]

0 commit comments

Comments
 (0)