Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Zad 1
Ponieważ były problemy z uruchomieniem to delikatnie zmieniono docker file.
Przykładowe zwrócenie przez trivy:
Total: 6 (UNKNOWN: 0, LOW: 3, MEDIUM: 3, HIGH: 0, CRITICAL: 0)├──────────────────────────────────────────────────────────────┼──────────────────┼──────────┤ ├───────────────────┼─────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ org.thymeleaf:thymeleaf-spring5 (app.jar) │ CVE-2021-43466 │ CRITICAL │ │ 3.0.12.RELEASE │ 3.0.13.RELEASE │ Template injection in thymeleaf-spring5 │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2021-43466 │
├──────────────────────────────────────────────────────────────┼──────────────────┼──────────┤ ├───────────────────┼─────────────────────────────────────┼───────────────────────────────────────────────
│ org.springframework:spring-webmvc (app.jar) │ CVE-2022-22965 │ CRITICAL │ │ │ 5.2.20.RELEASE, 5.3.18 │ spring-framework: RCE via Data Binding on JDK
Zad 2
┌──────────────┐
│ Scan Summary │
└──────────────┘
✅ Scan completed successfully.
• Findings: 26 (26 blocking)
• Rules run: 445
• Targets scanned: 1793
• Parsed lines: ~100.0%
• Scan skipped:
◦ Files larger than files 1.0 MB: 2
◦ Files matching .semgrepignore patterns: 30
• Scan was limited to files tracked by git
• For a detailed list of skipped files and lines, run semgrep with the --verbose flag
Ran 445 rules on 1793 files: 26 findings.
Obowiązkowe
Zad 3
Konfiguracja pliku:
Skończony job
Zad 4
Po uruchomieniu ZAPa i przeskanowaniu aplikacji:
FAIL-NEW: 0 FAIL-INPROG: 0 WARN-NEW: 12 WARN-INPROG: 0 INFO: 0 IGNORE: 0 PASS: 55Narzędzie wykryło podatności niewidoczne w SAST i SCA, takie jak brak nagłówków bezpieczeństwa HTTP, brak ochrony CSRF oraz nieprawidłowe zarządzanie sesją (np. jsessionid w URL). Problemy te nie zostały wykryte przez Semgrep i Trivy, ponieważ SAST analizuje wyłącznie kod źródłowy, a SCA jedynie zależności i obraz kontenerowy. OWASP ZAP, jako narzędzie DAST, testuje działającą aplikację i analizuje jej rzeczywiste odpowiedzi HTTP. Różnice w wynikach wynikają z analizy aplikacji na różnych etapach jej cyklu życia.