Commit 0fb3cba2 authored by Tim Powell's avatar Tim Powell

Added Dockerfile and SOUP CVEs testing instrucitons

parent fe023633
Pipeline #1848 failed with stages
FROM debian:buster AS builder
ADD requirements.txt requirements.txt
# Install packages needed for building the container (note cache-busting)
RUN apt -y update
RUN apt -y install software-properties-common
RUN apt -y install python3.7
RUN apt -y install python3-pip
RUN apt -y install git
# Set the correct version of python as the default
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.7 1
# Install required python packages
run apt-get -y install python3-pyside2.qt3dcore python3-pyside2.qt3dinput python3-pyside2.qt3dlogic python3-pyside2.qt3drender python3-pyside2.qtcharts python3-pyside2.qtconcurrent python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qthelp python3-pyside2.qtlocation python3-pyside2.qtmultimedia python3-pyside2.qtmultimediawidgets python3-pyside2.qtnetwork python3-pyside2.qtopengl python3-pyside2.qtpositioning python3-pyside2.qtprintsupport python3-pyside2.qtqml python3-pyside2.qtquick python3-pyside2.qtquickwidgets python3-pyside2.qtscript python3-pyside2.qtscripttools python3-pyside2.qtsensors python3-pyside2.qtsql python3-pyside2.qtsvg python3-pyside2.qttest python3-pyside2.qttexttospeech python3-pyside2.qtuitools python3-pyside2.qtwebchannel python3-pyside2.qtwebsockets python3-pyside2.qtwidgets python3-pyside2.qtx11extras python3-pyside2.qtxml python3-pyside2.qtxmlpatterns python3-pyside2uic
run python -m pip install -r requirements.txt
CMD ["python", "NativeUI/NativeUI.py"]
\ No newline at end of file
......@@ -39,53 +39,16 @@ pip install pytest-cov
pytest --cov=NativeUI NativeUI
```
## SOUP CVEs Testing
## System Tests
To test for Common Vulnerabilities and Exposures (CVEs) in the Software of Unknown Provence (SOUP) use the Dockerfile to build a docker image:
### Template
Status is marked in the test title with:
* :x: for not started
* :large_orange_diamond: for WIP
* :white_check_mark: for completed
RiskID | Domain | Functional Area | Standard Reference | Assignee
------ | ------ | --------------- | ------------------ | --------
SW | Software-GUI | Alarms | ISO-XX | Tim Powell
#### Scenario: <EXAMPLE>
GIVEN the <EVENT>
WHEN the <CAUSE>
THEN the <ACTION>
---
### Low Battery Alarm (10 minutes) :x:
RiskID | Domain | Functional Area | Standard Reference | Assignee
------ | ------ | --------------- | ------------------ | --------
SW8 | Software-GUI | Alarms | ISO80601-2-12:2020 | Tim Powell
#### Scenario: There is only 10 minutes of battery life left
GIVEN the alarm payload comes in
WHEN the alarm is about the battery
THEN check if the low battery alarm signal is sent
AND THEN the low battery alarm is displayed
---
### High Pressure Alarm to be HIGH Priority :large_orange_diamond:
RiskID | Domain | Functional Area | Standard Reference | Assignee
------ | ------ | --------------- | ------------------ | --------
SW11 | Software-GUI | Alarms | ISO80601-2-12:2020 | Tim Powell
```bash
docker build -t hplv .
```
#### Scenario: Excessive airway pressure applied
The docker image can then be scanned using `docker scan` which utilizes the [synk](https://snyk.io/) engine:
GIVEN the alarm payload received
WHEN the alarm_code: 7
THEN the high priority alarm signal should be sent
AND THEN alarm popup is triggered
AND THEN alarm is added to alarm list
```bash
docker scan --file Dockerfile --exclude-base hplv
```
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