Skip to content

Commit

Permalink
More AF Plan examples
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Bennetts <psiinon@gmail.com>
  • Loading branch information
psiinon committed Feb 6, 2024
1 parent 3793897 commit e59f0bb
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
61 changes: 61 additions & 0 deletions other/af-plans/FullScanBrokenCrystals.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
# A simple plan that performs a full unauthenticated scan against brokencrystals.com
# It uses both of the spiders and active scanning.
# The 2 spider tests will fail as they do not find at least 100 URLs,
# but they do not fail the whole plan as they just report at INFO level.
env:
contexts:
- name: "BrokenCrystals"
urls:
- "https://brokencrystals.com/"
includePaths: []
excludePaths: []
parameters:
failOnError: true
failOnWarning: false
progressToStdout: true
vars: {}
jobs:
- parameters:
scanOnlyInScope: true
enableTags: false
rules: []
name: "passiveScan-config"
type: "passiveScan-config"
- parameters: {}
name: "spider"
type: "spider"
tests:
- onFail: "INFO"
statistic: "automation.spider.urls.added"
site: ""
operator: ">="
value: 100
type: "stats"
name: "At least 100 URLs found"
- parameters:
maxDuration: 10
maxCrawlDepth: 10
name: "spiderAjax"
type: "spiderAjax"
tests:
- onFail: "INFO"
statistic: "spiderAjax.urls.added"
site: ""
operator: ">="
value: 100
type: "stats"
name: "At least 100 URLs found"
- parameters: {}
name: "activeScan"
type: "activeScan"
- parameters: {}
name: "passiveScan-wait"
type: "passiveScan-wait"
- parameters:
template: "modern"
reportTitle: "ZAP Scanning Report"
reportDescription: ""
name: "report"
type: "report"

23 changes: 23 additions & 0 deletions other/af-plans/ScriptEnvVarAccess.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# This plan show how you can access an env var in a script.
env:
contexts:
- name: "Script EnvVar Example"
urls:
- "https://example.com/"
jobs:
- parameters:
action: "add"
type: "standalone"
engine: "ECMAScript : Graal.js"
name: "print-env-vars.js"
inline: |
print(Java.type("java.lang.System").getenv("PATH"));
name: "script"
type: "script"
- parameters:
action: "run"
type: "standalone"
name: "print-env-vars.js"
name: "script"
type: "script"

0 comments on commit e59f0bb

Please sign in to comment.