UNCLASSIFIED

Commit 98b2779b authored by Andy Maksymowicz's avatar Andy Maksymowicz
Browse files

Merge branch 'development' into 'master'

Development

See merge request !20
parents 12c697c6 e9607b46
Pipeline #292129 failed with stages
in 70 minutes and 31 seconds
...@@ -13,7 +13,4 @@ The access level should be: ...@@ -13,7 +13,4 @@ The access level should be:
- [ ] All accounts have been provided the necessary accesses - [ ] All accounts have been provided the necessary accesses
/label ~"Access" ~"To Do" /label ~"Access" ~"To Do"
\ No newline at end of file
...@@ -17,7 +17,4 @@ Requesting this application be archived due to one of the following reasons: ...@@ -17,7 +17,4 @@ Requesting this application be archived due to one of the following reasons:
- [ ] Iron Bank frontend no longer lists application as available or approved - [ ] Iron Bank frontend no longer lists application as available or approved
/label ~"Container::Archive" /label ~"Container::Archive"
\ No newline at end of file
...@@ -7,69 +7,25 @@ Requesting application to be hardened. This is only for initial hardening of a c ...@@ -7,69 +7,25 @@ Requesting application to be hardened. This is only for initial hardening of a c
Current version: (State the current version of the application as you see it) Current version: (State the current version of the application as you see it)
## Communication Under support: (Is the updated version within the same major version of the application or is this a new major version?)
All communication should occur through this issue. This ensures that all information is documented in a centralized location and also ensures that all of the assignees are notified of updates. It is imperative that all required parties are listed as assignees of this issue and that individuals are not removed. Please do not remove anyone from the assignee list.
If you need to contact the Container Hardening team, please identify your assigned point of contact. You can find your point of contact by:
1. They should be listed as an assignee on this ticket
2. They should be listed in the `hardening_manifest.yaml` file under the `maintainers` section with a field of `cht_member: true`
If you have no assignee, feel free to tag Container Hardening leadership in your issue by commenting on this issue with your questions/concerns and then add `/cc @ironbank-notifications/leadership`. Gitlab will automatically notify all Container Hardening leadership to look at this issue and respond.
## Responsibilities
If this application is owned by a Contributor or Vendor (identifed as `Owner::Contributor` and `Owner::Vendor` respectively), then it is your responsibility to drive this issue through completion. This means that the Container Hardening team is not here to help push any deadlines/timeframes you may have with other customers or DoD agencies. If you have issues with the activity, you may notify Container Hardening leadership above. Do not change the ownership labels.
## Definition of Done ## Definition of Done
Hardening: Hardening:
- [ ] Hardening manifest is created and adheres to the schema (https://repo1.dsop.io/ironbank-tools/ironbank-pipeline/-/blob/master/schema/hardening_manifest.schema.json) - [ ] Container builds successfully
- [ ] Container builds successfully through the Gitlab CI pipeline - [ ] Greylist file has been created (requires a member from container hardening)
- [ ] Branch has been merged into `development` - [ ] Branch has been merged into `development`
- [ ] Project is configured for automatic renovate updates (if possible)
Justifications: Justifications:
- [ ] All findings have been justified per the above documentation - [ ] All findings have been justified per the above documentation
- [ ] Justifications have been attached to this issue - [ ] Justifications have been provided to the container hardening team
- [ ] Apply the label `Approval` to indicate this container is ready for the approval phase
Note: The justifications must be provided in a timely fashion. Failure to do so could result in new findings being identified which may start this process over.
Approval Process (Container Hardening Team processes): Approval Process (container hardening team processes):
- [ ] Peer review from Container Hardening Team - [ ] Peer review from Container Hardening Team
- [ ] Findings Approver has reviewed and approved all justifications - [ ] Findings Approver has reviewed and approved all justifications
- [ ] Approval request has been sent to Authorizing Official - [ ] Approval request has been sent to Authorizing Official
- [ ] Approval request has been processed by Authorizing Official - [ ] Approval request has been processed by Authorizing Official
Note: If the above approval process is kicked back for any reason, the `Approval` label will be removed and the issue will be sent back to `Open`. Any comments will be listed in this issue for you to address. Once they have been addressed, you may re-add the `Approval` label.
## Post Approval
### Continuous Monitoring
Once a container is approved, the `Approved` label will be applied to this issue and it will be closed. You will be able to find your applications on http://ironbank.dsop.io and https://registry1.dsop.io.
In addition to the above, your application will now be subscribed to continuous monitoring. This means that any new findings discovered as part of this will need justifications. To satisfy this process, any new findings will trigger a new Gitlab issue in this project with the label `Container::New Findings`. All members listed in the `maintainers` section of the `hardening_manifest.yaml` file will automatically be assigned. It is your responsibility as a Contributor or Vendor to monitor for this and provide justifications in a timely fashion. This newly created issue will have all the instructions necessary to complete the process. Failure to provide justifications could result in the revocation of the application's approval status.
### Updates
It is imperative that application updates be submitted as quickly as possible. We do not want applications to become stale. To help with this process, Ironbank recommends using a tool called [Renovate](https://github.com/renovatebot/renovate). This requires a `renovate.json` file to be placed in your project and can automate the creation of issues and merge requests.
If not using Renovate, it will be up to you as a Contributor or Vendor to keep this image up-to-date at all times. When you wish to submit an application update, you must create a new issue in this project using the `Application - Update` template and associate it with the corresponding merge request. If you submit a merge request alone, work will not proceed until a related issue is created. These issues are tracked using the label `Container::Update`.
Additionally, it is imperative that all updates must be followed through to completion. Simply submitting an application update but not following through on justifications and approvals does not suffice and risk your application's approval status being revoked.
### Bugs
Occassionally, users may file bug reports for your application. It is your responsibility to monitor for these since they are created inside your project repository. Assignees will automatically be populated by the `members` section of the `hardening_manifest.yaml` file and will have the label `Bug`.
/label ~"Container::Initial" /label ~"Container::Initial"
\ No newline at end of file
...@@ -13,38 +13,18 @@ Updated version: (State the version you would like the application updated to) ...@@ -13,38 +13,18 @@ Updated version: (State the version you would like the application updated to)
Under support: (Is the updated version within the same major version of the application or is this a new major version?) Under support: (Is the updated version within the same major version of the application or is this a new major version?)
## Communication
All communication should occur through this issue. This ensures that all information is documented in a centralized location and also ensures that all of the assignees are notified of updates. It is imperative that all required parties are listed as assignees of this issue and that individuals are not removed. Please do not remove anyone from the assignee list.
If you need to contact the Container Hardening team, please identify your assigned point of contact. You can find your point of contact by:
1. They should be listed as an assignee on this ticket
2. They should be listed in the `hardening_manifest.yaml` file under the `maintainers` section with a field of `cht_member: true`
If you have no assignee, feel free to tag Container Hardening leadership in your issue by commenting on this issue with your questions/concerns and then add `/cc @ironbank-notifications/leadership`. Gitlab will automatically notify all Container Hardening leadership to look at this issue and respond.
## Responsibilities
If this application is owned by a Contributor or Vendor (identifed as `Owner::Contributor` and `Owner::Vendor` respectively), then it is your responsibility to drive this issue through completion. This means that the Container Hardening team is not here to help push any deadlines/timeframes you may have with other customers or DoD agencies. If you have issues with the activity, you may notify Container Hardening leadership above. Do not change the ownership labels.
## Definition of Done ## Definition of Done
Hardening: Hardening:
- [ ] Hardening manifest has been updated and adheres to the schema (https://repo1.dsop.io/ironbank-tools/ironbank-pipeline/-/blob/master/schema/hardening_manifest.schema.json) - [ ] Container builds successfully
- [ ] Container builds successfully throughthe Gitlab CI pipeline - [ ] Container version has been updated in greylist file
- [ ] Branch has been merged into `development` - [ ] Branch has been merged into `development`
- [ ] Project is configured for automatic renovate updates (if possible)
No new findings: No new findings:
- [ ] There are no new findings in this update. Skip the Justifications and Approval Process steps and apply the label `Approval` - [ ] There are no new findings in this update. Skip the Justifications and Approval Process steps and apply the label ~"Approval".
Justifications: Justifications:
- [ ] All findings have been justified per the above documentation - [ ] All findings have been justified per the above documentation
- [ ] Justifications have been provided to the container hardening team - [ ] Justifications have been provided to the container hardening team
- [ ] Skip the Justifications and Approval Process steps and apply the label `Approval`
Note: The justifications must be provided in a timely fashion. Failure to do so could result in new findings being identified which may start this process over.
Approval Process: Approval Process:
- [ ] Peer review from Container Hardening Team - [ ] Peer review from Container Hardening Team
...@@ -52,31 +32,6 @@ Approval Process: ...@@ -52,31 +32,6 @@ Approval Process:
- [ ] Approval request has been sent to Authorizing Official - [ ] Approval request has been sent to Authorizing Official
- [ ] Approval request has been processed by Authorizing Official - [ ] Approval request has been processed by Authorizing Official
Note: If the above approval process is kicked back for any reason, the `Approval` label will be removed and the issue will be sent back to `Open`. Any comments will be listed in this issue for you to address. Once they have been addressed, you may re-add the `Approval` label.
## Post Approval
### Continuous Monitoring
Once a container is approved, the `Approved` label will be applied to this issue and it will be closed. You will be able to find your applications on http://ironbank.dsop.io and https://registry1.dsop.io.
In addition to the above, your application will now be subscribed to continuous monitoring. This means that any new findings discovered as part of this will need justifications. To satisfy this process, any new findings will trigger a new Gitlab issue in this project with the label `Container::New Findings`. All members listed in the `maintainers` section of the `hardening_manifest.yaml` file will automatically be assigned. It is your responsibility as a Contributor or Vendor to monitor for this and provide justifications in a timely fashion. This newly created issue will have all the instructions necessary to complete the process. Failure to provide justifications could result in the revocation of the application's approval status.
### Updates
It is imperative that application updates be submitted as quickly as possible. We do not want applications to become stale. To help with this process, Ironbank recommends using a tool called [Renovate](https://github.com/renovatebot/renovate). This requires a `renovate.json` file to be placed in your project and can automate the creation of issues and merge requests.
If not using Renovate, it will be up to you as a Contributor or Vendor to keep this image up-to-date at all times. When you wish to submit an application update, you must create a new issue in this project using the `Application - Update` template and associate it with the corresponding merge request. If you submit a merge request alone, work will not proceed until a related issue is created. These issues are tracked using the label `Container::Update`.
Additionally, it is imperative that all updates must be followed through to completion. Simply submitting an application update but not following through on justifications and approvals does not suffice and risk your application's approval status being revoked.
### Bugs
Occassionally, users may file bug reports for your application. It is your responsibility to monitor for these since they are created inside your project repository. Assignees will automatically be populated by the `members` section of the `hardening_manifest.yaml` file and will have the label `Bug`.
/label ~"Container::Update" /label ~"Container::Update"
\ No newline at end of file
...@@ -33,9 +33,4 @@ logs, and code as it's very hard to read otherwise.) ...@@ -33,9 +33,4 @@ logs, and code as it's very hard to read otherwise.)
- [ ] Bug has been identified and corrected within the container - [ ] Bug has been identified and corrected within the container
/label ~Bug /label ~Bug
\ No newline at end of file
...@@ -28,9 +28,4 @@ ...@@ -28,9 +28,4 @@
- [ ] Feature has been implemented - [ ] Feature has been implemented
/label ~Feature /label ~Feature
\ No newline at end of file
...@@ -3,10 +3,5 @@ ...@@ -3,10 +3,5 @@
(Detailed description of the question you'd like to ask the leadership team) (Detailed description of the question you'd like to ask the leadership team)
/label ~"Question::Leadership" ~"To Do" /label ~"Question::Leadership" ~"To Do"
/cc @ironbank-notifications/leadership /cc @ironbank-notifications/leadership
\ No newline at end of file
...@@ -8,20 +8,12 @@ Container has new findings discovered during continuous monitoring. ...@@ -8,20 +8,12 @@ Container has new findings discovered during continuous monitoring.
Justifications: Justifications:
- [ ] All findings have been justified - [ ] All findings have been justified
- [ ] Justifications have been provided to the container hardening team - [ ] Justifications have been provided to the container hardening team
- [ ] `Approval` label has been applied
Note: The justifications must be provided in a timely fashion. Failure to do so could result in new findings being identified which may start this process over.
Approval Process: Approval Process:
- [ ] Findings Approver has reviewed and approved all justifications - [ ] Findings Approver has reviewed and approved all justifications
- [ ] Approval request has been sent to Authorizing Official - [ ] Approval request has been sent to Authorizing Official
- [ ] Approval request has been processed by Authorizing Official - [ ] Approval request has been processed by Authorizing Official
Note: If the above approval process is kicked back for any reason, the `Approval` label will be removed and the issue will be sent back to `Open`. Any comments will be listed in this issue for you to address. Once they have been addressed, you may re-add the `Approval` label.
/label ~"Container::New Findings" /label ~"Container::New Findings"
\ No newline at end of file
...@@ -3,10 +3,5 @@ ...@@ -3,10 +3,5 @@
(Detailed description of the question you'd like to ask the onboarding team) (Detailed description of the question you'd like to ask the onboarding team)
/label ~"Question::Onboarding" ~"To Do" /label ~"Question::Onboarding" ~"To Do"
/cc @ironbank-notifications/onboarding /cc @ironbank-notifications/onboarding
\ No newline at end of file
...@@ -27,10 +27,4 @@ ...@@ -27,10 +27,4 @@
- [ ] Pipeline failure has been resolved - [ ] Pipeline failure has been resolved
/label ~Pipeline /label ~Pipeline
\ No newline at end of file
ARG BASE_REGISTRY=registry1.dso.mil
ARG BASE_IMAGE=redhat/ubi/ubi8
ARG BASE_TAG=8.3
#change this for deployment!!!
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
RUN yum -y update \
&& yum clean all
#TO fix CCE-80935-0
#RUN yum -y install crypto-policies
#RUN yum -y install gnutls-utils
# for https://access.redhat.com/security/cve/CVE-2021-23240
RUN rm -rf /usr/libexec/sudo/sesh
ARG CODESONAR_PACKAGE=codesonar-5.4p0.20200911-x86_64-pc-linux.tar.gz
COPY ["${CODESONAR_PACKAGE}", "/opt"]
RUN tar -zxvf /opt/${CODESONAR_PACKAGE} -C /opt
RUN rm -rf /opt/${CODESONAR_PACKAGE}
RUN ln -s /opt/codesonar-5.4p0 /opt/codesonar
RUN useradd -ms /bin/bash codesonar
# remove some packages that are not needed
RUN rm -rf /opt/codesonar-5.4p0/third-party/julia-sarif
RUN rm -rf /opt/codesonar-5.4p0/third-party/julia-tools
RUN rm -rf /opt/codesonar-5.4p0/third-party/pmd
RUN rm -rf /opt/codesonar-5.4p0/third-party/pmd-5.0.4
RUN rm -rf /opt/codesonar-5.4p0/third-party/postgresql-8.3
RUN rm -rf /opt/codesonar-5.4p0/third-party/postgresql-8.4
RUN rm -rf /opt/codesonar-5.4p0/third-party/postgresql-9.0
RUN rm -rf /opt/codesonar-5.4p0/third-party/postgresql-9.1
RUN rm -rf /opt/codesonar-5.4p0/third-party/postgresql-9.2
RUN rm -rf /opt/codesonar-5.4p0/third-party/postgresql-9.3
RUN rm -rf /opt/codesonar-5.4p0/third-party/postgresql-9.6
RUN rm -rf /opt/codesonar-5.4p0/third-party/python/inst/lib/python2.7/test/*pem /opt/codesonar-5.4p0/third-party/python/instmt/lib/python2.7/test/*pem
RUN rm -rf /opt/codesonar-5.4p0/third-party/python/inst/lib/python2.7/site-packages/urllib3* /opt/codesonar-5.4p0/third-party/python/instmt/lib/python2.7/site-packages/urllib3*
RUN rm -rf /usr/lib/python3.6/site-packages/urllib3
RUN mkdir /home/codesonar/hub \
&& chown codesonar.codesonar /home/codesonar/hub
#The following is needed as RH8 does not have libnsl.so.1
RUN ln -s /usr/lib64/libnsl.so.2 /usr/lib64/libnsl.so.1
COPY scripts/* /opt/
RUN chmod +x /opt/codesonar-exec.sh && \
chmod +x /opt/codesonar-health-check.sh
VOLUME [ /home/codesonar ]
HEALTHCHECK --interval=30s --timeout=30s --start-period=180s --retries=3 CMD /opt/codesonar-health-check.sh
#adjust some options
RUN rm /opt/codesonar/UNACCEPTED_LICENSE.txt
RUN touch /opt/codesonar/TELEMETRY_DISABLED
# CCE-82155-3
RUN echo "auth required pam_wheel.so use_uid" >> /etc/pam.d/su
RUN echo "CtrlAltDelBurstAction=none" >> /etc/systemd/system.conf
#RUN fips-mode-setup --enable
#RUN update-crypto-policies --set FIPS:OSPP
USER codesonar
WORKDIR /home/codesonar
EXPOSE 7340/tcp
CMD ["sh", "-c", "/opt/codesonar-exec.sh"]
This diff is collapsed.
# <application name> ## CodeSonar 5.4p0
This is a default image that provides the CodeSonar Hub service. Data volumes can
be mounted such that data persists. A license from GrammaTech is required to be
able to use the hub and provide scans. Contact sales@grammatech.com for access
to a license.
## Build the Image
Build the image using the standard
`docker build -t codesonar-hub .`
## Running the Container
Suggested use is to run the container using:
`docker volume create hub`
`docker network create --driver bridge net `
`docker run -d --name hub -p 8080:7340 -v hub:/home/codesonar/hub --network net codesonar-hub`
This will put all data in the hub volume and route localhost:8080 to the hub and
connect the container to network net such that scanners can connect to it.
The hub will have default password for the `Administrator account` set to
`HubSecretPasswd` at creation-time, which can be changed by
`--build-arg HUB_DEFAULT_PWD=YourOwnSecretPWD` during the container build step.
Please change the default password after initial hub creation. This is also the
time to install the run-time license.
## Shutdown
Recommended to shutdown the container through
`http://[host]:[port]/command/shutdown` before terminating the container
## Resources
CPU Min/Recommended 2/8+<br>
RAM Min/Recommended/Max 2G/8G/Unlimited
## Ports
Application is using port 7340
Project template for all Iron Bank container repositories.
\ No newline at end of file
---
apiVersion: v1
# The repository name in registry1, excluding /ironbank/
name: "grammatech/codesonar/codesonar-hub"
# List of tags to push for the repository in registry1
# The most specific version should be the first tag and will be shown
# on ironbank.dso.mil
tags:
- "1.0.0"
- "latest"
# Build args passed to Dockerfile ARGs
args:
BASE_IMAGE: "redhat/ubi/ubi8"
BASE_TAG: "8.3"
# Docker image labels
labels:
org.opencontainers.image.title: "codesonar-hub"
org.opencontainers.image.description: "CodeSonar Hub Container"
org.opencontainers.image.licenses: "GrammaTech Commercial License"
org.opencontainers.image.url: "http://support.grammatech.com/"
org.opencontainers.image.vendor: "GrammaTech"
org.opencontainers.image.version: "5.4"
mil.dso.ironbank.image.keywords: "GrammaTech, CodeSonar, SAST, CI/CD"
mil.dso.ironbank.image.type: "commercial"
mil.dso.ironbank.product.name: "CodeSonar"
# List of resources to make available to the offline build context
resources:
- url: "https://download.grammatech.com/diracc2011/codesonar-5.4/codesonar-5.4p0.20200911-x86_64-pc-linux.tar.gz"
filename: "codesonar-5.4p0.20200911-x86_64-pc-linux.tar.gz" # [required field] desired staging name for the build context
validation:
type: "sha256" # supported: sha256, sha512
value: "1d0d47a2a5cde4e88d04397bcdb107188b6e999b3a2ccde5b4dddb05677b83be" # must be lowercase
auth:
type: basic
id: grammatech
# List of project maintainers
maintainers:
- email: "mhermeling@grammatech.com"
# The name of the current container owner
name: "Mark Hermeling"
# The gitlab username of the current container owner
username: "markhermeling"
#!/bin/sh
if test -f "/home/codesonar/hub/hubpwd"; then
echo "Starting hub in /home/codesonar/hub with existing pwd"
/opt/codesonar/codesonar/bin/codesonar hub-start /home/codesonar/hub 0.0.0.0:7340
else
HUB_DEFAULT_PWD=$(date +%s | base64 | head -c 32)
echo "${HUB_DEFAULT_PWD}" > /home/codesonar/hub/hubpwd
chmod 600 /home/codesonar/hub/hubpwd
echo "Starting hub with new hub password: ${HUB_DEFAULT_PWD}"
echo -e "${HUB_DEFAULT_PWD}\n${HUB_DEFAULT_PWD}\n" | /opt/codesonar/codesonar/bin/codesonar hub-start /home/codesonar/hub 0.0.0.0:7340
fi
echo "Hub started..."
while [ 1 ]
do
echo "Hub running"
sleep 60
done
#!/bin/sh
curl -s http://codesonar:7340 -o /dev/null 2>&1
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment