GithubHelp home page GithubHelp logo

Comments (12)

scovetta avatar scovetta commented on August 16, 2024 1

Alternatively, a directory structure where all of the supporting files were stored in a separate directory, like:

attack_surface_analyzer.exe
readme.txt
resources\
   resources\foo.dll
   resources\bar.dll
   …

I think this would be fine too.

from attacksurfaceanalyzer.

Fabi avatar Fabi commented on August 16, 2024 1

@Fabi that is the implementation in .net core 3.1 which is why we are not using it currently.

In the issue linked this is addressed in .NET 5

Can run managed components of the app directly from bundle, without need for extraction to disk.

Thats why I write native binaries :)
Managed are directly executed, native are always extracted.

from attacksurfaceanalyzer.

gfs avatar gfs commented on August 16, 2024

As a stopgap we could make a .bat/.sh file that just runs "resources\AttackSurfaceAnalyzer.exe", and put everything into the resources directory.

from attacksurfaceanalyzer.

scovetta avatar scovetta commented on August 16, 2024

That would certainly work for me.

from attacksurfaceanalyzer.

gfs avatar gfs commented on August 16, 2024

I saw that this is going to be a native feature of .NET Core 3, at least on Windows platforms.

I did experimentally create the running scripts, checked in in the Cli directory, but haven't fully tested that everything works with them (for example, I suspect the Compare command may not because it needs to load Output.cshtml from the filesystem).

from attacksurfaceanalyzer.

gfs avatar gfs commented on August 16, 2024

Unfortunately the .NET Core 3.0 approach is basically the warp packer approach, which is not desirable for our use case. Further minor experiments with other ILMerge type approaches haven't been successful either.

from attacksurfaceanalyzer.

gfs avatar gfs commented on August 16, 2024

The best workaround for now is to first install .NET Core and then run

dotnet tool install Microsoft.CST.AttackSurfaceAnalyzer.CLI

See nuget.org

from attacksurfaceanalyzer.

gfs avatar gfs commented on August 16, 2024

This should be possible in .NET 5.

https://devblogs.microsoft.com/dotnet/introducing-net-5/

from attacksurfaceanalyzer.

gfs avatar gfs commented on August 16, 2024

Depends on dotnet/runtime#36590 in .NET 5.

dotnet publish -r win-x64 /p:PublishSingleFile=true /p:IncludeNativeLibrariesInSingleFile=true

dotnet publish -r linux-x64 /p:PublishSingleFile=true

from attacksurfaceanalyzer.

Fabi avatar Fabi commented on August 16, 2024

Depends on dotnet/runtime#36590 in .NET 5.

dotnet publish -r win-x64 /p:PublishSingleFile=true /p:IncludeNativeLibrariesInSingleFile=true

dotnet publish -r linux-x64 /p:PublishSingleFile=true

Note that native binaries are still extracted to the Temp folder if bundled into a single binary. Otherwise they are placed in the same directory

from attacksurfaceanalyzer.

gfs avatar gfs commented on August 16, 2024

@Fabi that is the implementation in .net core 3.1 which is why we are not using it currently.

In the issue linked this is addressed in .NET 5

Can run managed components of the app directly from bundle, without need for extraction to disk.

from attacksurfaceanalyzer.

gfs avatar gfs commented on August 16, 2024

I understand now the distinction you are drawing. It sounds like it may still need to extract native binaries. Thanks for the extra info!

from attacksurfaceanalyzer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.