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

Secret scanning alerts only come once the secrets UI has been loaded #59

Closed
baztian opened this issue Oct 12, 2022 · 6 comments
Closed

Comments

@baztian
Copy link

baztian commented Oct 12, 2022

I've tried pushing a secret to one of our repos. The Teams alert will only come once I've opened the /#/secrets endpoint in my browser. Any chance to make this come without UI interaction? We don't use the UI.

@sumanmaity1234
Copy link
Collaborator

Hi @baztian, you are right the secrets send alerts only when you open /#/secrets page on UI.
The intentions are as follows

  • Secrets alerts is not enabled by default, if someone want use it, they have to enable it using environment variable
  • GitActionBoard doesn't want to continuously pull data from github due to API rate limit

Due to above reasons, GitActionBoard fetch only required data when user open certain page on the UI.

@sumanmaity1234
Copy link
Collaborator

Hi @baztian, you mentioned, you don't use UI, just curious how are you fetching the workflow failures? Are you using gitActionBorad APIs? If yes, you can use /v1/alerts/secrets API to fetch secrets. It'll also send the alerts to MS Teams

@baztian
Copy link
Author

baztian commented Oct 13, 2022

Thanks @sumanmaity1234. A few of our team mates are actually using the UI. I'm using https://anaynayak.github.io/buildnotify/ which relies on the cctray.xml. How gitactionboard gets to know about build failures? Doesn't it need to do polling for it as well?

@baztian
Copy link
Author

baztian commented Oct 13, 2022

Also if I start polling secrets endpoint this would also result in rate limiting issues. Especially when all of our team members are doing it it actually gets worse.

@sumanmaity1234
Copy link
Collaborator

Hi @baztian,

How gitactionboard gets to know about build failures? Doesn't it need to do polling for it as well?

GitActionBoard UI does the polling. So, if you are using UI, depends on configuration it figures out for how long it should continuously do the polling. Currently, in your case https://anaynayak.github.io/buildnotify/ is doing the polling from gitactionboard server.

Also if I start polling secrets endpoint this would also result in rate limiting issues. Especially when all of our team members are doing it it actually gets worse.

Yes and No, it depends on your server side cache configuration. Server side cache can be configured by CACHE_EXPIRES_AFTER environment variable.

You can find all the server side configuration here and UI configuration here.

@sumanmaity1234
Copy link
Collaborator

Closing this issue due to inactivity. Feel free open this ticket if you encounter similar issue

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

2 participants