Lab4 Maciej Pietrewicz #49
Open
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.
Zad1
Dodałem plik trivy.txt zawierający wygenerowany raport
Zad2
Dodałem plik semgrep.txt z wygenerowanym raportem
Zad3
name: Security Scan
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
security-tests:
runs-on: ubuntu-latest
Zmodyfikowałem wersję trivy, gdyż poprzednia nie była dostępna. Dodatkowo przy instalowaniu semgrepa dałem --ignore-installed, aby nie wywołało errora przy już zainstalowanych bibliotekach.
Link do zadania CI/CD: https://github.com/pietrewi/task4/actions/runs/20284214238/job/58253913895
Zad4
Testy bezpieczeństwa aplikacji obejmowały zarówno analizę statyczną jak i dynamiczną. Trivy skupia się na sprawdzaniu bibliotek (np. apt, bash czy bsdutils) i zależności pod kątem znanych podatności, Semgrep analizuje statycznie kod źródłowy w poszukiwaniu błędów i potencjalnych luk (np.
javascript.browser.security.insecure-document-method.insecure-document-method
User controlled data in methods like
innerHTML,outerHTMLordocument.writeis an anti-patternthat can lead to XSS vulnerabilities)
, a skolei OWASP ZAP testuje działającą aplikację, wykrywając problemy związane z konfiguracją serwera i komunikacją sieciową, takie jak np. 'Cookie without SameSite Attribute' lub 'Absence of Anti-CSRF Tokens'. Różnice w wynikach wynikają z faktu, że każde narzędzie bada inny obszar – zależności, kod czy zachowanie uruchomionej aplikacji.