GitHub alert banner

Hello Team,

I am trying to set a banner similar to the below one for GitHub repositories. Is there any APIs available to do so ?

Hey @bhuvi11 and welcome!

It’s a bit unclear to me what you’re trying to do:

  • Do you have your own site and are you trying to implement a banner on there using perhaps HTML/CSS/JS?
  • Would you like to fetch security alerts from GitHub using an API?
  • Would you like to construct your own API to search for security alerts?
  • Or something else?

Maybe you can add a bit more detail about the final goal to your question. This way, you’re more likely to receive a good answer.

@mpboom , thanks for your inputs.

We are currently trying to use GitHub workflow to run security scans on repositories.
Our goal is to provide a banner like dependobot gives which will redirect to the code scanning alert tab.

Is there any APIs available using which i can construct such a banner?

The GitHub API has some docs around Code scanning. You could implement that API somehow on your own system/site to enable viewing security alerts from within that system.
https://docs.github.com/en/rest/reference/code-scanning

Thanks for your reply.

Yes i did see those APIs to get/post alerts.
I am more curious on providing an announcement banner similar to the one below

Like this to the repository