Skip to content

Conversation

@pvdz
Copy link
Contributor

@pvdz pvdz commented Feb 11, 2025

This works my way through the socket scan create command and ... gets it to work.

Okay. First create a pom.xml and store it somewhere. I've stored it in ~/tmp/okay/pom.xml

Next, run this:

npm exec socket scan create -- --repo=depscantmp --branch=mastertmp --tmp --cwd ~/tmp/okay SocketDev pom.xml

(The npm exec only for dev stuff)
You'll need to login as usual. The repo and branch dont seem to matter. tmp makes it a temporary scan (?). cwd is mandatory here since in cli dev I can't move to a different folder and various pieces hard require a cwd.

This will lead to an upload like https://socket.dev/dashboard/org/SocketDev/sbom/b48218c6-2d93-40b6-b343-a0dc6e1150df?tab=dependencies

... profit.


const packagePaths = await getPackageFilesFullScans(
cwd,
cli.input,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would have sent the org as part of potential folders (which probably would lead to an error? or accidental include maybe?). Not sure how blocking this was but it's fixed now.

@pvdz pvdz marked this pull request as ready for review February 13, 2025 18:19
@pvdz pvdz requested a review from jdalton February 13, 2025 18:19
@pvdz pvdz changed the title scan create: upload a pom.xml scan create: allow maven files, include cwd option Feb 13, 2025
@jdalton jdalton merged commit 05599f6 into main Feb 13, 2025
15 checks passed
@jdalton jdalton deleted the scan_pom branch February 13, 2025 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants