- Notifications
You must be signed in to change notification settings - Fork428
Addproxy_ca_certificate_file output tostart-proxy action#2846
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Useful to avoid duplicating this across different extractors (e.g. C# and Go)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR adds an output for the proxy CA certificate file in the start-proxy action to avoid duplicating certificate handling in different extractors.
- Adds FS import and logic to write the CA certificate to a temporary file.
- Updates the ProxyConfig type to include an optional certificate file property.
- Mirrors the changes in both the TypeScript and JavaScript implementations.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/start-proxy-action.ts | Adds certificate file writing logic and exposes its file path output. |
| lib/start-proxy-action.js | Applies the same certificate file writing changes as in the TS file. |
Comments suppressed due to low confidence (1)
lib/start-proxy-action.js:122
- The catch block only logs the error without failing the action. To guarantee the certificate file is properly written, consider rethrowing the error so that the process fails on write errors.
} catch (error) {Tip: Leave feedback on Copilot's review comments with the 👎 and 👍 buttons to help improve review quality.Learn more
| fs.writeFileSync(certificatePath,ca.cert); | ||
| proxyConfig.ca_certificate_file=certificatePath; | ||
| }catch(error){ |
CopilotAIApr 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The catch block only logs the error without failing the action. Given the PR description's goal to ensure the certificate file is successfully written, consider rethrowing the error to fail execution if the write fails.
Uh oh!
There was an error while loading.Please reload this page.
I figured it would be useful to avoid duplicating this across different extractors that e.g. set
SSL_CERT_FILEfor relevant sub-processes. That's currently done by the C# extractor and looks like will be done by the Go extractor as well. By doing it in the action, we can avoid duplicating this process in those extractors.Notes/questions for reviewers
Merge / deployment checklist