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

bugfix: #1072 #1579

Merged
merged 17 commits into from
Dec 18, 2023
Merged

bugfix: #1072 #1579

merged 17 commits into from
Dec 18, 2023

Conversation

ilanRosenbaum
Copy link
Contributor

@ilanRosenbaum ilanRosenbaum commented Dec 6, 2023

Add token to URL in analyzer so it can access private repos
Remove URL from logs to avoid token being in logs, replaced with what the URL would be without the token

@ilanRosenbaum ilanRosenbaum changed the title Bugfix for #1072 & and remove vulnerabilities bugfix: #1072 & remove vulnerabilities Dec 6, 2023
@ilanRosenbaum ilanRosenbaum changed the title bugfix: #1072 & remove vulnerabilities bugfix: #1072 Dec 7, 2023
@@ -86,21 +87,23 @@ export class Analyzer {
/**Clone a repository */
async clone(repository) {
const {repo, branch, path} = this.parse(repository)
let url = /^https?:\/\//.test(repo) ? repo : `https://github.com/${repo}`
const token = core.getInput("token")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you gate this behind a if (process.env.GITHUB_ACTIONS) so this only execute on GitHub Actions ?
The web instances probably doesn't need to expose its token on guest tokens (even though this indepth mode shouldn't be enabled on them anyways)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes absolutely. Just pushed the change

@lowlighter
Copy link
Owner

Hi 👋 !

Thanks for looking into this !
Just a small comment, else it looks good to me

The CI is probably broken so don't worry about it
I don't really have time to fix it urrently, especially since it'll be refactored in the v4 of metrics anyways

@ilanRosenbaum
Copy link
Contributor Author

Hey, any update on getting this merged? It's a small change and should make this product work better for a lot of users

@lowlighter lowlighter merged commit 995dd4a into lowlighter:master Dec 18, 2023
@lowlighter
Copy link
Owner

Thanks for your contribution !

@github-actions github-actions bot locked and limited conversation to collaborators Jun 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants