Skip to content
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

SecretScanner http server post format #57

Open
Ethonwu opened this issue Apr 27, 2022 · 4 comments
Open

SecretScanner http server post format #57

Ethonwu opened this issue Apr 27, 2022 · 4 comments
Assignees

Comments

@Ethonwu
Copy link

Ethonwu commented Apr 27, 2022

Hello,
I run SecretScanner as a http server.
But I do not know how to use curl command to POST data to http server.
This is my example:

curl -X POST http://0.0.0.0:8080/secret-scan -d '{"image_name_with_tag_list": ["<my_image_name:tag>"]}' -H 'Content-Type: application/json'

And output is:

{"error":"Image Name with tag list is required "}

I have trace code, and in http.go file, I found the runSecretScan func in line 49.
But I always POST fail to http server, what is POST data format?

@saurabh2253
Copy link
Contributor

Hi @Ethonwu
Thank you for trying SecretScanner, currently the SecretScanner http server is written for the use with ThreatMapper only. We will get back to you with a generic http service.

@Ethonwu
Copy link
Author

Ethonwu commented Apr 29, 2022

Thank you, i find this api server mode input para is depend on registry_image_save.py options.
I am researching this python code, if I have some research result such as: find some POST data pattern, I will try to update this info on README

@ibreakthecloud
Copy link
Member

Hi @Ethonwu, the feature to run SecretScanner as a independent HTTP server mode has been added. Please refer to this PR: #67
I'll update the README with this.
thanks

@ibreakthecloud ibreakthecloud self-assigned this Sep 29, 2022
@ibreakthecloud
Copy link
Member

TODO:

  • Update Readme with standalone mode

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

No branches or pull requests

3 participants