Skip to content
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

Cross-Platform .rsp File Support #1016

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

lukaskohl-msft
Copy link
Collaborator

Unwrapping/expanding .rsp files used to be supported on Windows only due to FFI calling to shell32.dll. This PR removes FFI in favor of a code native solution.

the sarif-sdk submodule contains a reimplementation of CommandLineToArgvW. Rather than updating sarif-sdk, we've moved the relevant code into the BinSkim codebase, and pointed to the reimplementation instead to slightly lessen our reliance on sarif-sdk, while simultaneously increasing our supported platforms.

Alongside this change, tests were ported and altered over into the BinSkim codebase.

@lukaskohl-msft lukaskohl-msft requested a review from a team as a code owner October 10, 2024 09:23
@martin-reznik
Copy link
Collaborator

martin-reznik commented Oct 10, 2024 via email

Copy link
Collaborator

@mkacmar mkacmar left a comment

Choose a reason for hiding this comment

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

I've left a few comments / questions.

src/BinSkim.Driver/ExpandArguments.cs Outdated Show resolved Hide resolved
src/BinSkim.Driver/ExpandArguments.cs Show resolved Hide resolved
src/BinSkim.Driver/ExpandArguments.cs Show resolved Hide resolved
src/BinSkim.Driver/ExpandArguments.cs Dismissed Show dismissed Hide dismissed
@AllDwarf AllDwarf self-requested a review October 23, 2024 09:22
Copy link
Collaborator

@AllDwarf AllDwarf left a comment

Choose a reason for hiding this comment

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

Seems to be working on my end, Good Job! We should proceed once it got merged with E2E testing with Guardian on Linux.

@lukaskohl-msft lukaskohl-msft force-pushed the users/lukaskohl/rsp-linux branch 2 times, most recently from a4d66a2 to 1bbafaf Compare October 30, 2024 15:11
@mkacmar
Copy link
Collaborator

mkacmar commented Oct 30, 2024

Can you please rebase @lukaskohl-msft so that CodeQL passes before merge?

Lukas Kohl added 5 commits October 31, 2024 10:42
Makes support for .rsp files cross-platform
Example of an .rsp file:
"/example/to/binary/example.exe" # Binary
# ---- Libraries ----
"/example/to/libraries/library1.dll"
"/example/to/libraries/library2.dll"

would result in:
"/example/to/binary/example.exe"
"/example/to/libraries/library1.dll"
"/example/to/libraries/library2.dll"
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.

4 participants