diff --git a/sast_results/golangci-lint.txt b/sast_results/golangci-lint.txt new file mode 100644 index 0000000..83b80c2 --- /dev/null +++ b/sast_results/golangci-lint.txt @@ -0,0 +1,5 @@ +internal/ui/console.go:62:3: QF1003: could use tagged switch on resp (staticcheck) + if resp == "y" || resp == "yes" { + ^ +1 issues: +* staticcheck: 1 diff --git a/scripts/config_sast.sh b/scripts/config_sast.sh index 4e99b62..cb4b377 100644 --- a/scripts/config_sast.sh +++ b/scripts/config_sast.sh @@ -4,7 +4,6 @@ # -------------------------------------- echo "Установка curl" - sudo apt update sudo apt install -y curl @@ -12,5 +11,7 @@ echo "Создание директории для результатов ана mkdir -p sast_results echo "Установка bearer" - curl -sfL https://raw.githubusercontent.com/Bearer/bearer/main/contrib/install.sh | sh + +echo "Установка golangci-lint" +curl -sSfL https://golangci-lint.run/install.sh | sh -s v2.11.2 diff --git a/scripts/run_sast.sh b/scripts/run_sast.sh index 23d25a9..3988513 100644 --- a/scripts/run_sast.sh +++ b/scripts/run_sast.sh @@ -6,4 +6,7 @@ echo "Запуск bearer" ./bin/bearer scan --output sast_results/bearer.txt . +echo "Запуск golangci-lint" +./bin/golangci-lint run > sast_results/golangci-lint.txt + echo "Анализ завершён, результаты в sast_results"