Skip to content

Commit

Permalink
Sonar: Reactivate rule - Run container as default user
Browse files Browse the repository at this point in the history
  • Loading branch information
qmonmert committed Nov 1, 2024
1 parent e0bbb41 commit ed67b27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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,S1133,S6206,S6548,S6437,S6471,UndocumentedApi,S2301,S7027
sonar.issue.ignore.multicriteria=S117,S119,S125_1,S125_2,S3437,S4502,S4684,S4032,S5778,S1133,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 @@ -78,10 +78,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"]

0 comments on commit ed67b27

Please sign in to comment.