Skip to content

Client Spider Support #143

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

JohnnyIrvin
Copy link

#!/usr/bin/env python

from zapv2 import ZAPv2
import time


target = 'http://127.0.0.1' # Change to match the target URL you want to scan
apikey = 'changeme' # Change to match the API key set in ZAP, or use None if the API key is disabled


zap = ZAPv2(apikey=apikey)

print(f'Spidering target {target}')
scanid = zap.clientSpider.scan(url=target)

while (int(zap.clientSpider.status(scanid)) < 100):
    print(f"Spider progress %: {zap.clientSpider.status(scanid)}")
    time.sleep(2)
    
print('Spider completed')

Adds the client spider to the python api.

@psiinon
Copy link
Member

psiinon commented May 29, 2025

Logo
Checkmarx One – Scan Summary & Detailsa4ececca-f38c-4a73-ab4a-13411bcf5c9c

Great job, no security vulnerabilities found in this Pull Request

@JohnnyIrvin JohnnyIrvin force-pushed the client-spider-support branch 2 times, most recently from 9e7970f to 7db890a Compare May 29, 2025 14:27
@JohnnyIrvin
Copy link
Author

@psiinon fixed commit signatures. no way for me to rerun job.

@kingthorin
Copy link
Member

You need to do all of them.
Or squash it and do just one.
https://github.com/zaproxy/zap-api-python/pull/143/checks?check_run_id=43121122608

@JohnnyIrvin JohnnyIrvin force-pushed the client-spider-support branch from 7db890a to 7d9d49d Compare May 29, 2025 15:48
@JohnnyIrvin
Copy link
Author

@kingthorin thank you for clarification.

should be fixed now.

any other changes required?

@JohnnyIrvin
Copy link
Author

@kingthorin or @psiinon -- Any update? Looking to move this forward.

@thc202
Copy link
Member

thc202 commented May 30, 2025

If you want to move this forward generate the implementation instead of hand write it.

@thc202
Copy link
Member

thc202 commented May 30, 2025

The changelog should be updated.

@JohnnyIrvin
Copy link
Author

JohnnyIrvin commented May 30, 2025

@thc202

Where is the documentation to generate it automatically?

Where should I place example usage?

@JohnnyIrvin
Copy link
Author

The changelog should be updated.

What should it say?

@JohnnyIrvin JohnnyIrvin requested a review from thc202 May 30, 2025 16:13
@thc202
Copy link
Member

thc202 commented May 30, 2025

Read https://github.com/zaproxy/zap-api-python/blob/main/CONTRIBUTING.md and https://github.com/zaproxy/zap-api-python/blob/main/CHANGELOG.md

@thc202 thc202 removed their request for review May 30, 2025 16:19
@JohnnyIrvin
Copy link
Author

@thc202

Unable to get the build system to build the plugin to generate the api.

Spent less time writing this simple addition then it takes to get automation tools to run.

Maybe.. Will come back later.

@JohnnyIrvin
Copy link
Author

JohnnyIrvin commented May 30, 2025

The changelog should be updated.

Added change log per request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants