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

add support to pass api key #8

Open
basantPayU opened this issue Apr 21, 2023 · 5 comments
Open

add support to pass api key #8

basantPayU opened this issue Apr 21, 2023 · 5 comments
Assignees

Comments

@basantPayU
Copy link

According to docs of security headers, we need to pass an API key for the request, but the current implementation doesn't provide a way to do so.
P.S. Refer to the image
Screenshot 2023-04-21 at 4 31 35 PM

@iamazeem
Copy link

iamazeem commented Apr 21, 2023

@basantPayU: Did you check https://github.com/koenbuyens/securityheaders?

And, did you try invoking curl from the command line?

Example:

curl -H "x-api-key: <API-KEY>" "https://api.securityheaders.com/?q=<URL>&hide=on&followRedirects=on" | jq -r '.summary.grade'

@marcuslindblom
Copy link
Owner

marcuslindblom commented Apr 24, 2023

The above seems to work just fine. So this issue is up for grabs :)

@marcuslindblom marcuslindblom self-assigned this Apr 24, 2023
@marcuslindblom
Copy link
Owner

I made a PR draft. This is breaking though because the order of params is changed. What do you think @iamazeem @basantPayU

@basantPayU
Copy link
Author

@marcuslindblom Looks good to me!

@iamazeem
Copy link

Looks good! 👍

BTW, I just released this composite action:
https://github.com/iamazeem/security-headers-action

As of now, docker actions run only on the Linux runners.
I wanted to create something that works on all the GHA runners.

Would love to hear some feedback from you both. 😄
Thank you!

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