All Projects → nccgroup → Sobelow

nccgroup / Sobelow

Licence: apache-2.0
Security-focused static analysis for the Phoenix Framework

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to Sobelow

Guardian auth
The Guardian Authentication Implementation Using Ecto/Postgresql Elixir Phoenix [ User Authentication ]
Stars: ✭ 15 (-98.64%)
Mutual labels:  phoenix-framework
Php Language Server
PHP Implementation of the VS Code Language Server Protocol 🆚↔🖥
Stars: ✭ 1,019 (-7.62%)
Mutual labels:  static-analysis
Pysonar2
PySonar2: an advanced semantic indexer for Python
Stars: ✭ 1,074 (-2.63%)
Mutual labels:  static-analysis
Endpointfinder
Stars: ✭ 34 (-96.92%)
Mutual labels:  static-analysis
Bucklescript Phx
BuckleScript binding for Phoenix Channel/Presence
Stars: ✭ 42 (-96.19%)
Mutual labels:  phoenix-framework
Stoat
STatic (LLVM) Object file Analysis Tool
Stars: ✭ 44 (-96.01%)
Mutual labels:  static-analysis
Structured Acceptance Test
An open format definition for static analysis tools
Stars: ✭ 10 (-99.09%)
Mutual labels:  static-analysis
Cxxctp
DEPRECATED. USE INSTEAD github.com/blockspacer/flextool
Stars: ✭ 58 (-94.74%)
Mutual labels:  static-analysis
Domtresat
Dominator Tree LLVM Pass to Test Satisfiability
Stars: ✭ 42 (-96.19%)
Mutual labels:  static-analysis
Cognicrypt
CogniCrypt is an Eclipse plugin that supports Java developers in using Java Cryptographic APIs.
Stars: ✭ 50 (-95.47%)
Mutual labels:  static-analysis
Phoenix mjml
Phoenix Template Engine for Mjml
Stars: ✭ 35 (-96.83%)
Mutual labels:  phoenix-framework
Clair
Vulnerability Static Analysis for Containers
Stars: ✭ 8,356 (+657.57%)
Mutual labels:  static-analysis
Apisan
APISan: Sanitizing API Usages through Semantic Cross-Checking
Stars: ✭ 46 (-95.83%)
Mutual labels:  static-analysis
Cfmt
cfmt is a tool to wrap Go comments over a certain length to a new line.
Stars: ✭ 28 (-97.46%)
Mutual labels:  static-analysis
Spoon
Spoon is a metaprogramming library to analyze and transform Java source code (up to Java 15). 🥄 is made with ❤️, 🍻 and ✨. It parses source files to build a well-designed AST with powerful analysis and transformation API.
Stars: ✭ 1,078 (-2.27%)
Mutual labels:  static-analysis
Befa Library
High-level library for executable binary file analysis
Stars: ✭ 12 (-98.91%)
Mutual labels:  static-analysis
Elixirbooks
List of Elixir books
Stars: ✭ 1,021 (-7.43%)
Mutual labels:  phoenix-framework
Comb
Interactive code auditing and grep tool in Emacs Lisp
Stars: ✭ 58 (-94.74%)
Mutual labels:  static-analysis
Clj Kondo
A linter for Clojure code that sparks joy.
Stars: ✭ 1,083 (-1.81%)
Mutual labels:  static-analysis
Intellidroid
A targeted input generator for Android that improves the effectiveness of dynamic malware analysis.
Stars: ✭ 46 (-95.83%)
Mutual labels:  static-analysis

Sobelow

Module Version Hex Docs Total Download License Last Updated

Sobelow is a security-focused static analysis tool for the Phoenix framework. For security researchers, it is a useful tool for getting a quick view of points-of-interest. For project maintainers, it can be used to prevent the introduction of a number of common vulnerabilities.

Currently Sobelow detects some types of the following security issues:

  • Insecure configuration
  • Known-vulnerable Dependencies
  • Cross-Site Scripting
  • SQL injection
  • Command injection
  • Code execution
  • Denial of Service
  • Directory traversal
  • Unsafe serialization

Potential vulnerabilities are flagged in different colors according to confidence in their insecurity. High confidence is red, medium confidence is yellow, and low confidence is green.

A finding is typically marked "low confidence" if it looks like a function could be used insecurely, but it cannot reliably be determined if the function accepts user-supplied input. That is to say, if a finding is marked green, it may be critically insecure, but it will require greater manual validation.

Note: This project is in constant development, and additional vulnerabilities will be flagged as time goes on. If you encounter a bug, or would like to request additional features or security checks, please open an issue!

Installation

To use Sobelow, you can add it to your application's dependencies.

def deps do
  [
    {:sobelow, "~> 0.8", only: :dev}
  ]
end

You can also install Sobelow globally by executing the following from the command line:

$ mix archive.install hex sobelow

To install from the master branch, rather than the latest release, the following command can be used:

$ mix archive.install github nccgroup/sobelow

Use

The simplest way to scan a Phoenix project is to run the following from the project root:

$ mix sobelow

Options

Note: Any path arguments should be absolute paths, or relative to the application root.

  • --root or -r - Specify the application root directory. Accepts a path argument, e.g. ../my_project.

  • --verbose or -v - Print code snippets and additional finding details.

  • --ignore or -i - Ignore given finding types. Accepts a comma-separated list of module names, e.g. XSS.Raw,Traversal.

  • --ignore-files - Ignore files. Accepts a comma-separated list of file names, e.g. config/prod.exs.

  • --details or -d - Get finding-type details. Accepts a single module name, e.g. Config.CSRF.

  • --all-details - Get details of all finding-types.

  • --private - Skip update checks.

  • --router - Specify router location. This only needs to be used if the router location is non-standard. Accepts a path argument, e.g. my/strange/router.ex.

  • --exit - Return non-zero exit status at or above a confidence threshold of low (default), medium, or high.

  • --threshold - Return findings at or above a confidence level of low (default), medium, or high.

  • --format or -f - Specify findings output format. Accepts a format, e.g. txt or json.

    Note that options such as --verbose will not work with the json format. All json formatted findings contain a type, file, and line key. Other keys may vary.

  • --quiet - Return a single line indicating number of findings. Otherwise, return no output if there are no findings.

  • --compact - Minimal, single-line findings.

  • --save-config - Generates a configuration file based on command line options. See Configuration Files for more information.

  • --config - Run Sobelow with configuration file. See Configuration Files for more information.

  • --mark-skip-all - Mark all displayed findings as skippable.

  • --clear-skip - Clear configuration created by --mark-skip-all.

  • --skip - Ignore findings that have been marked for skipping. See False Positives for more information.

Configuration Files

Sobelow allows users to save frequently used options in a configuration file. For example, if you find yourself constantly running:

$ mix sobelow -i XSS.Raw,Traversal --verbose --exit Low

You can use the --save-config flag to create your .sobelow-conf config file:

$ mix sobelow -i XSS.Raw,Traversal --verbose --exit Low --save-config

This command will create the .sobelow-conf file at the root of your application. You can edit this file directly to make changes.

You can also run the command without any options:

$ mix sobelow --save-config

when you first start out using this package - the generated configuration file will be populated with the default values for each option. (This helps in quickly incorporating this package into a pre-existing codebase.)

Now if you want to run Sobelow with the saved configuration, you can run Sobelow with the --config flag.

$ mix sobelow --config

False Positives

Sobelow favors over-reporting versus under-reporting. As such, you may find a number of false positives in a typical scan. These findings may be individually ignored by adding a # sobelow_skip comment, along with a list of modules, before the function definition.

# sobelow_skip ["Traversal"]
def vuln_func(...) do
  ...
end

When integrating Sobelow into a new project, there can be a large number of false positives. To mark all printed findings as false positives, run sobelow with the --mark-skip-all flag.

Once you have tagged the appropriate findings, run Sobelow with the --skip flag.

$ mix sobelow --skip

While # sobelow_skip comments can only mark function-level findings (and so cannot be used to skip configuration issues), the --mark-skip-all flag can be used to skip any finding type.

Modules

Findings categories are broken up into modules. These modules can then be used to either ignore classes of findings (via the ignore and skip options) or to get vulnerability details (via the details option).

This list, and other helpful information, can be found on the command line:

$ mix help sobelow

Updates

When scanning a project, Sobelow will occasionally check for updates, and will print an alert if a new version is available. Sobelow keeps track of the last update-check by creating a .sobelow file in the root of the scanned project.

If this functionality is not desired, the --private flag can be used with the scan.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].