-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Main #11826
Main #11826
Conversation
Документация
Настройка GitHub Actions для SAST
Старая версия (v3) больше не поддерживается. Теперь используется actions/upload-artifact@v4.
Возможные причины ошибок
Мы будем использовать OWASP ZAP , так как он является одним из самых популярных и хорошо интегрируется с CI/CD.
Основные исправления Добавлена проверка доступности целевого URL : Перед запуском OWASP ZAP выполняется проверка, доступен ли указанный URL. Если URL недоступен, пайплайн завершается с ошибкой. Установлен exit-code: 0 для OWASP ZAP : Теперь пайплайн не будет завершаться с ошибкой, даже если OWASP ZAP обнаружит уязвимости. Это позволяет вам анализировать результаты без прерывания CI/CD процесса. Добавлено ожидание запуска приложения : Если ваше приложение требуется запустить локально (например, Flask или Django), добавлено ожидание (sleep 20) для обеспечения его полной готовности перед сканированием. Обработка отсутствия отчета : Если файл отчета OWASP ZAP не был создан, добавлено сообщение об ошибке вместо немедленного завершения пайплайна.
Для выполнения DAST (Dynamic Application Security Testing) с использованием инструментов Nikto и Arachni
Объяснение каждого шага Checkout code : Клонирует ваш репозиторий для дальнейшего анализа. Scan repository for secrets with TruffleHog : Использует TruffleHog для поиска секретов (API-ключи, пароли, токены) в истории коммитов репозитория. Результаты сохраняются в trufflehog-report.txt. Scan Docker image with Trivy : Использует Trivy для сканирования Docker-образа на наличие уязвимостей. Указывает уровень серьезности (HIGH,CRITICAL) для фильтрации результатов. Результаты сохраняются в trivy-report.txt. Scan configuration files with Checkov : Использует Checkov для анализа конфигурационных файлов (например, Dockerfile, Terraform, Kubernetes) на наличие небезопасных практик. Результаты сохраняются в checkov-report.txt. Upload security reports : Сохраняет все сгенерированные отчеты как артефакты GitHub Actions для дальнейшего анализа. Send results to vulnerability management system : Опциональный шаг для отправки результатов в систему управления уязвимостями через API.
Исправленная конфигурация unit-tests.yml с Flask
DryRun Security SummaryThe pull request addresses multiple security vulnerabilities in GitHub Actions workflows and documentation, including hardcoded credentials, exposed sensitive data, overly permissive configurations, and risky token handling practices. Expand for full summaryThe PR modifies multiple GitHub Actions workflows and the README.md, introducing several security-related changes across CI/CD configuration and documentation. Security findings include: 1) Hardcoded credentials in multiple workflows (e.g., SECRET_KEY, database passwords), 2) Potential sensitive information exposure through artifacts and logs, 3) Broad GitHub Actions permissions in some workflows, 4) Hardcoded testing configurations with DEBUG=True, 5) Potential secret and vulnerability scanning limitations, and 6) Risks associated with token and environment variable handling across different workflow files. Code AnalysisWe ran |
@usd877 Several issues on this one:
So, I'm going to close this PR under the assumption that it was made in error. Feel free to reopen the PR and fix the issues above if my assumption wasn't correct. |
We are narrowing the scope of acceptable enhancements to DefectDojo in preparation for v3. Learn more here:
https://github.com/DefectDojo/django-DefectDojo/blob/master/readme-docs/CONTRIBUTING.md
Description
Describe the feature / bug fix implemented by this PR.
If this is a new parser, the parser guide may be worth (re)reading.
Test results
Ideally you extend the test suite in
tests/
anddojo/unittests
to cover the changed in this PR.Alternatively, describe what you have and haven't tested.
Documentation
Please update any documentation when needed in the documentation folder)
Checklist
This checklist is for your information.
dev
.dev
.bugfix
branch.Extra information
Please clear everything below when submitting your pull request, it's here purely for your information.
Moderators: Labels currently accepted for PRs:
Contributors: Git Tips
Rebase on dev branch
If the dev branch has changed since you started working on it, please rebase your work after the current dev.
On your working branch
mybranch
:In case of conflict:
When everything's fine on your local branch, force push to your
myOrigin
remote:To cancel everything:
Squashing commits
pick
byfixup
on the commits you want squashed outpick
byreword
on the first commit if you want to change the commit messageForce push to your
myOrigin
remote: