BinaryDefense / BinaryDefense.FSharp.Analyzers

Security analyzers for the FSharp (F#) language
MIT License
37 stars 4 forks source link

BinaryDefense.FSharp.Analyzers

What?

This is a set of security analyzers for the FSharp Language using the FSharp Analyzers SDK.

Currently supported analyzers

Why?

Detecting security issues early in your codebase can save your company from embarrassment or financial repercussions.

Also, there's growing need for security based tools in the FSharp ecosystem. Many tools cover CSharp projects but not FSharp. This project seeks to remedy that.

How?

1 - Install the analyzer using paket

Use paket to install the analyzer into a specialized Analyzers dependency group like this:

paket add BinaryDefense.FSharp.Analyzers.Hashing --group Analyzers

DO NOT use storage:none because we want the analyzer package to be downloaded physically into packages/analyzers directory.

2.a - Enable analyzers in Ionide

Make sure you have these settings in Ionide for FSharp

{
    "FSharp.enableAnalyzers": true,
    "FSharp.analyzersPath": [
        "./packages/analyzers"
    ]
}

2.b - Install the fsharp-analyzers tool

dotnet tool add fsharp-analyzers
dotnet tool restore

Then run it against your project

dotnet fsharp-analyzers --project ./src/MyLibrary/MyLibrary.fsproj

NuGet

Package Stable Prerelease
BinaryDefense.FSharp.Analyzers.Hashing NuGet Badge NuGet Badge

Developing

Make sure the following requirements are installed on your system:

or


Environment Variables


Building

> build.cmd <optional buildtarget> // on windows
$ ./build.sh  <optional buildtarget>// on unix

The bin of your library should look similar to:

$ tree src/MyCoolNewLib/bin/
src/MyCoolNewLib/bin/
└── Debug
    ├── net461
    │   ├── FSharp.Core.dll
    │   ├── MyCoolNewLib.dll
    │   ├── MyCoolNewLib.pdb
    │   ├── MyCoolNewLib.xml
    └── netstandard2.1
        ├── MyCoolNewLib.deps.json
        ├── MyCoolNewLib.dll
        ├── MyCoolNewLib.pdb
        └── MyCoolNewLib.xml

Build Targets

Releasing

git add .
git commit -m "Scaffold"
git remote add origin https://github.com/user/MyCoolNewLib.git
git push -u origin master
paket config add-token "https://www.nuget.org" 4003d786-cc37-4004-bfdf-c4f3e8ef9b3a
#### 0.2.0 - 2017-04-20
- FEATURE: Does cool stuff!
- BUGFIX: Fixes that silly oversight
./build.sh Release