-
Notifications
You must be signed in to change notification settings - Fork 14
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
Port socket-python-cli #268
Conversation
Signed-off-by: typicode <[email protected]>
Thank you @typicode! Lets have a call to walk through this soon |
febdc37
to
2089b9a
Compare
23acf7e
to
26255b0
Compare
88098db
to
9aa1da8
Compare
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is unstable ownership?A new collaborator has begun publishing package versions. Package stability and security risk may be elevated. Try to reduce the number of authors you depend on to reduce the risk to malicious actors gaining access to your supply chain. Packages should remove inactive collaborators with publishing rights from packages on npm. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
Signed-off-by: John-David Dalton <[email protected]>
Thank you @typicode 🎉 ! |
Signed-off-by: typicode <[email protected]> Signed-off-by: John-David Dalton <[email protected]> Co-authored-by: John-David Dalton <[email protected]>
Signed-off-by: typicode <[email protected]> Signed-off-by: John-David Dalton <[email protected]> Co-authored-by: John-David Dalton <[email protected]>
Summary
This PR is a port of socket-python-cli as of https://github.com/SocketDev/socket-python-cli/tree/6d4fc56faee68d3a4764f1f80f84710635bdaf05
It's focused on GitHub Action support due to time constraint and only function required for it were ported.
However, file names, classes, functions and logic are mapped 1:1 as much as possible. While in some places it may differ from the usual JavaScript approach, it should allow easier debugging and porting of new functionalities/bug fixes from
socket-python-cli
.Socket SDK and Octokit were used to provide accurate TS typing of responses for API calls out of the box.
Usage
See https://github.com/socketdev-demo/javascript-threats/blob/main/.github/workflows/socket.yml for usage reference
There are some differences though. In
socket.yml
, some data like changed files is created using shell scripts and then passed using environment variables.When possible, this port creates this data using JavaScript instead of shell code. In particular, these environment variables don't need to be provided:
CHANGED_FILES
(1 2)EVENT_ACTION
(1)How to test:
Note: a valid socket API passed as an env variable may be needed
Action
The following step must be defined in the action file: