-
Notifications
You must be signed in to change notification settings - Fork 59
support to load swaggers from an extension #639
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
Conversation
- Add swagger data extension to the extensions list - Update documentation to include new extension usage
} | ||
|
||
targetFile := filepath.Base(extFile) | ||
fmt.Println("start to save", filepath.Join(output, targetFile)) |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
Sensitive data returned by an access to passwdParts
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, we should avoid logging the full path that includes potentially sensitive information. Instead, we can log only the filename or a sanitized version of the path. This way, we maintain the functionality of logging progress without exposing sensitive data.
- Modify the logging statement to exclude the sensitive parts of the path.
- Specifically, in the
DownloadSwaggerData
function, change the logging statement on line 52 to log only thetargetFile
instead of the full path. - No additional methods or imports are needed for this change.
-
Copy modified line R52
@@ -51,3 +51,3 @@ | ||
targetFile := filepath.Base(extFile) | ||
fmt.Println("start to save", filepath.Join(output, targetFile)) | ||
fmt.Println("start to save", targetFile) | ||
if err = downloader.WriteTo(reader, output, targetFile); err == nil { |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
There are 1 test cases, failed count 0:
Reported by api-testing. |
…uring archive extraction ("Zip Slip") Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Rick <[email protected]>
|
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #