| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| startProxyExports.getCredentials( | ||
| getRunnerLogger(true), | ||
| undefined, | ||
| registryCredentials, | ||
| undefined, | ||
| ), |
Code scanning / CodeQL
Untrusted data passed to external API with additional heuristic sources
There was a problem hiding this comment.
I believe this is a false positive because this is part of the call to the test. The input is part of the input in the test.
Sorry, something went wrong.
| const parsed = JSON.parse(credentialsStr) as Credential[]; | ||
| const out: Credential[] = []; | ||
| for (const e of parsed) { | ||
| if (e.url === undefined && e.host === undefined) { |
There was a problem hiding this comment.
Is it also an error if both url and host are defined?
Sorry, something went wrong.
There was a problem hiding this comment.
I am not sure, I believe the proxy will use the url in that case. I will double check.
Sorry, something went wrong.
There was a problem hiding this comment.
Added a comment.
Sorry, something went wrong.
|
|
||
| // Filter credentials based on language if specified. `type` is the registry type. | ||
| // E.g., "maven_feed" for Java/Kotlin, "nuget_repository" for C#. | ||
| if (registryTypeForLanguage && e.type !== registryTypeForLanguage) { |
There was a problem hiding this comment.
If registryTypeForLanguage is undefined and e.type is defined, do we still want to include this?
eg- if e.type is maven_feed and the language is cpp, is this registry still relevant?
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, this is the behavior that want mostly for backwards compatibility. If no language is specified, we keep the information for all registries. Otherwise, older versions that did not have this input will filter everything away.
Sorry, something went wrong.
| startProxyExports.getCredentials( | ||
| getRunnerLogger(true), | ||
| undefined, | ||
| credentialsInput, | ||
| undefined, | ||
| ), |
Code scanning / CodeQL
Untrusted data passed to external API with additional heuristic sources
There was a problem hiding this comment.
Thanks for fixing. One more thing. I should have mentioned that in the original comment.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
In #2680, I wanted the behavior to consider all existing credentials if the language argument was not provided. This was not the case, though.
I've fixed the bug and added regression tests.
Merge / deployment checklist