Doug/add node and socket back into container #11
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes critical bugs in the Socket Basics security scanner that prevented Socket facts files from uploading to the Socket Security platform and adds support for custom SAST rules. Additionally, it significantly expands JavaScript/TypeScript security rules with comprehensive OWASP Top 10 2021 coverage.
Root Cause
Socket Facts Upload Failure: The SDK
fullscans.postmethod received incorrect path parameters - using absolute paths instead of relative filenames with properbase_pathconfiguration.Output Path Resolution: When using relative output paths with a workspace parameter, files were created in the wrong directory.
Limited SAST Flexibility: No mechanism existed for users to provide custom SAST rule directories.
Outdated JavaScript Rules: Minimal rule coverage missing modern vulnerability patterns and OWASP Top 10 2021 alignment.
Fix
Socket Facts Upload: Corrected SDK call to use relative filename (
.socket.facts.json) with properbase_pathparameter pointing to parent directory. Fixed syntax error inbase_pathsparameter.Path Resolution: Added logic to resolve relative output paths against workspace directory when specified.
Custom SAST Rules: Added
INPUT_USE_CUSTOM_SAST_RULESandINPUT_CUSTOM_SAST_RULE_PATHconfiguration parameters, with fallback to bundled rules for languages without custom rules.JavaScript/TypeScript Rules: Default rules have improved detection
Public Changelog
Added
INPUT_USE_CUSTOM_SAST_RULESandINPUT_CUSTOM_SAST_RULE_PATHenvironment variablesFixed
Improved
Checklist
Files Modified:
socket_basics.py,connectors.yaml,rules/javascript/security.yml,version.py