Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Бондаренко Марина Витальевна
SDL
Commits
f0d6b70e
Commit
f0d6b70e
authored
9 months ago
by
bonmari
Browse files
Options
Download
Patches
Plain Diff
fix
parent
b38d70d6
main
ci-cd
fix-ci
master
1 merge request
!1
Ci cd
Pipeline
#153388
failed
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+21
-1
.gitlab-ci.yml
with
21 additions
and
1 deletion
+21
-1
.gitlab-ci.yml
+
21
−
1
View file @
f0d6b70e
...
...
@@ -38,11 +38,31 @@ test-zap:
script
:
# - curl --header "url: 'http://localhost:9005'" --header "apikey: '8tm221jcqtolmprhbt2dq2q8ev'" http://localhost:8080/JSON/ascan/action/scan/
-
Invoke-RestMethod -Method GET -Uri "http://localhost:8080/JSON/core/view/alerts/?baseurl=localhost:9005&apikey=8tm221jcqtolmprhbt2dq2q8ev"
# Выполнение пассивного сканирования
-
Invoke-RestMethod -Method GET -Uri "http://localhost:8080/JSON/ascan/action/scan/?url=localhost:9005&apikey=8tm221jcqtolmprhbt2dq2q8ev"
# Выполнение активного сканирования
-
curl "http://localhost:8080/JSON/ascan/action/scan/?url=localhost:9005&apikey=8tm221jcqtolmprhbt2dq2q8ev"
# Ожидание завершения сканирования
-
|
SCAN_STATUS=$( Invoke-RestMethod -Method GET -Uri "http://localhost:8080/JSON/ascan/view/status/?apikey=8tm221jcqtolmprhbt2dq2q8ev")
while [ "$SCAN_STATUS" != "100" ]; do
echo "Сканирование на $SCAN_STATUS% завершено..."
sleep 5
SCAN_STATUS=$( Invoke-RestMethod -Method GET -Uri "http://localhost:8080/JSON/ascan/view/status/?apikey=8tm221jcqtolmprhbt2dq2q8ev")
done
# Получение и сохранение результатов сканирования
-
RESULTS=$(Invoke-RestMethod -Method GET -Uri "http://localhost:8080/JSON/core/view/alerts/?baseurl=localhost:9005&apikey=8tm221jcqtolmprhbt2dq2q8ev")
-
echo "Результаты сканирования
:
$RESULTS"
# - sleep 60
# - 'curl --request GET "http://localhost:8080/JSON/core/view/alerts/?baseurl=localhost:9005&apikey=8tm221jcqtolmprhbt2dq2q8ev"'
# - ./zap/zap.sh -daemon -port ${ZAP_PORT} -config api.key=$ZAP_API_KEY &
# - chmod +x ./zapTest.sh
-
bash ./zapTest.sh
#
- bash ./zapTest.sh
# - 'curl "http://localhost:8080/JSON/ascan/action/scan/?url=localhost:9005&apikey=8tm221jcqtolmprhbt2dq2q8ev"'
# - 'curl "http://localhost:8080/JSON/core/view/alerts/?baseurl=localhost:9005&apikey=8tm221jcqtolmprhbt2dq2q8ev"''
# sonarqube-vulnerability-report:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets