Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonar: Reactivate rule - Run container as default user #11272

Merged
merged 1 commit into from
Nov 7, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ sonar.exclusions=\
src/main/webapp/app/index.tsx,\
src/main/webapp/main.ts

sonar.issue.ignore.multicriteria=S117,S119,S125_1,S125_2,S3437,S4502,S4684,S4032,S5778,S6206,S6548,S6437,S6471,UndocumentedApi,S2301,S7027
sonar.issue.ignore.multicriteria=S117,S119,S125_1,S125_2,S3437,S4502,S4684,S4032,S5778,S6206,S6548,S6437,UndocumentedApi,S2301,S7027

# Rule: Local variable and method parameter names should comply with a naming convention
# Handled with checkstyle. Should be revisited with java 25 once Unnamed Patterns and Variables are available (JEP 443)
Expand Down Expand Up @@ -74,10 +74,6 @@ sonar.issue.ignore.multicriteria.S6548.ruleKey=java:S6548
sonar.issue.ignore.multicriteria.S6437.resourceKey=src/main/resources/config/application.yml
sonar.issue.ignore.multicriteria.S6437.ruleKey=java:S6437

# Rule: Run container as default user
sonar.issue.ignore.multicriteria.S6471.resourceKey=src/main/docker/cassandra/**/*
sonar.issue.ignore.multicriteria.S6471.ruleKey=docker:S6471

# Rule: Methods should not contain selector parameters
sonar.issue.ignore.multicriteria.S2301.resourceKey=src/main/webapp/app/auth/oauth2-auth.service.ts
sonar.issue.ignore.multicriteria.S2301.ruleKey=typescript:S2301
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM {{ cassandraDockerImage }}

RUN useradd -m cassandra_user

# script to orchestrate the automatic keyspace creation and apply all migration scripts
COPY cassandra/scripts/autoMigrate.sh /usr/local/bin/autoMigrate
RUN chmod 755 /usr/local/bin/autoMigrate
Expand All @@ -8,4 +10,6 @@ RUN chmod 755 /usr/local/bin/autoMigrate
COPY cassandra/scripts/execute-cql.sh /usr/local/bin/execute-cql
RUN chmod 755 /usr/local/bin/execute-cql

USER cassandra_user

ENTRYPOINT ["autoMigrate"]