From df1e2942d7eb0ecc5f05a72d3353b4d1ed4da536 Mon Sep 17 00:00:00 2001 From: alex-dzeda <120701369+alex-dzeda@users.noreply.github.com> Date: Tue, 16 Apr 2024 11:55:36 -0500 Subject: [PATCH] BCDA-7991: Address sonarqube security issues (#195) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## đĢ Ticket https://jira.cms.gov/browse/BCDA-7991 ## đ Changes Updated Dockerfile + problematic html file. ## âšī¸ Context for reviewers SonarQube had 8 "findings" related to the static site application: 2 related to the Dockerfile in the project, and 6 related to external link outs. 7 of those findings will be resolved with this PR, and one can remain ignored (the copying all files in a directory in the Dockerfile) as it's mitigated by addressing the second Dockerfile finding (ensuring that the docker container runs in user mode) ## â Acceptance Validation Addressed/mitigated each security issue by ensuring the Dockerfile specifies the use of a non-root user and adding rel="noopener" tags. ## đ Security Implications - [ ] This PR adds a new software dependency or dependencies. - [ ] This PR modifies or invalidates one or more of our security controls. - [ ] This PR stores or transmits data that was not stored or transmitted before. - [ ] This PR requires additional review of its security implications for other reasons. If any security implications apply, add Jason Ashbaugh (GitHub username: StewGoin) as a reviewer and do not merge this PR without his approval. --- Dockerfiles/Dockerfile.static_site | 1 + _includes/data/bcda_v2_data.html | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfiles/Dockerfile.static_site b/Dockerfiles/Dockerfile.static_site index 83ffe98..9394972 100644 --- a/Dockerfiles/Dockerfile.static_site +++ b/Dockerfiles/Dockerfile.static_site @@ -5,3 +5,4 @@ WORKDIR /bcda-site-static COPY . . RUN ["bundle", "install"] ENTRYPOINT ["bundle", "exec", "jekyll", "build", "--config", "_config.yml,_version_config.yml"] +USER 1000:1000 \ No newline at end of file diff --git a/_includes/data/bcda_v2_data.html b/_includes/data/bcda_v2_data.html index 0339319..af90127 100644 --- a/_includes/data/bcda_v2_data.html +++ b/_includes/data/bcda_v2_data.html @@ -19,7 +19,7 @@
- For details, see the FHIR Explanation of Benefit resource page, and select the R3 Diff tab under section 13.10.4 Resource Content + For details, see the FHIR Explanation of Benefit resource page, and select the R3 Diff tab under section 13.10.4 Resource Content