Skip to content

Commit

Permalink
Merge pull request #11272 from qmonmert/runcontainer
Browse files Browse the repository at this point in the history
Sonar: Reactivate rule - Run container as default user
  • Loading branch information
murdos authored Nov 7, 2024
2 parents a837aee + 665ac90 commit 918074c
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,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"]

0 comments on commit 918074c

Please sign in to comment.