Skip to content
Snippets Groups Projects
Commit a0d3b4ce authored by wep23441's avatar wep23441
Browse files

solutions hidden

parent 3faf97b8
No related branches found
No related tags found
No related merge requests found
......@@ -4,4 +4,4 @@ __pycache__/
node_modules/
public
_build
solutions/
\ No newline at end of file
solutions_here
\ No newline at end of file
### Solution Case 1 Lint:
1. The `include` path for the lint job was incorrect in `.gitlab-ci.yml`.
2. The file paths in `flake8` and `black` were incorrect, pointing to a non-existent directory in `ci-configs/case-1-lint/lint.yml`. These should be updated to the correct paths `./case-1-lint/`.
3. The `functions.py` had various formatting issues, including:
- Unused imports
- Lack of spacing and indentation for readability
- Function definitions and class methods that were not formatted according to PEP 8 standards
\ No newline at end of file
### Solution Case 2 Test:
1. broken dependencies (correct version of pytest==8.3.5)
2. coverage not enough to pass the job (uncomment tests inside `test_functions.py`)
3. failing test in `ci-configs/case-2-test.yml/unit_test.yml`==> (`line12: assert subtract(5, 3) == 2`)
4. incorrect command in `ci-configs/case-2-test.yml/unit_test.yml` ==> (`line 6: pytestt --> pytest`)
\ No newline at end of file
### Solution Case 3 Build:
1. `Dockerfile` path in the `build_image.yml` job needs to be corrected and uncomment `entrypoint: [""]`, as well as removal of unnesessary line `echo "Pushing image with tag ${CI_COMMIT_TAG}"` and figure out what the job does.
2. in `Dockerfile` the insytallation of dependencies is missing `RUN pip install --no-cache-dir -r requirements.txt`
3. `.dockerignore` file ignores `requirements.txt` at the moment, needs to be corrected
4. remove unnecessary dependency from `build.yml`
\ No newline at end of file
### Solution Case 4 Security:
1. inside container_scan.yml the path should be CS_IMAGE: "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${IMAGE_TAG}"
2. uncommment lines in `.semgrepignore` ...all the false positives mostly..can triage and look through them if you have gitlab premium...
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment