Skip to content


GitHub stars sarif GitHub release (latest SemVer) GitHub last commit GitHub commit activity GitHub contributors

Use --ignore-globs to ignore files and/or folders

devskim documentation

DevSkim - GitHub

Configuration in MegaLinter

Variable Description Default value
REPOSITORY_DEVSKIM_ARGUMENTS User custom arguments to add in linter CLI call
Ex: -s --foo "bar"
REPOSITORY_DEVSKIM_PRE_COMMANDS List of bash commands to run before the linter None
REPOSITORY_DEVSKIM_POST_COMMANDS List of bash commands to run after the linter None
REPOSITORY_DEVSKIM_DISABLE_ERRORS Run linter but consider errors as warnings false

IDE Integration

Use devskim in your favorite IDE to catch errors before MegaLinter !

IDE Extension Name Install
Visual Studio Code VSCode DevSkim Install in VSCode

MegaLinter Flavours

This linter is available in the following flavours

Flavor Description Embedded linters Info
all Default MegaLinter Flavor 112 Docker Image Size (tag) Docker Pulls
security Optimized for security 21 Docker Image Size (tag) Docker Pulls

Behind the scenes

How are identified applicable files

  • If this linter is active, all files will always be linted

How the linting is performed

devskim is called once on the whole project directory (project CLI lint mode)

  • filtering can not be done using MegaLinter configuration variables,it must be done using devskim configuration or ignore file (if existing)
  • VALIDATE_ALL_CODEBASE: false does not make devskim analyze only updated files

Example calls

devskim analyze .
devskim analyze --file-format sarif .

Help content

Microsoft DevSkim Command Line Interface 0.7.101+7d74268320

Usage: devskim [options] [command]

  -?|-h|--help  Show help information
  -v|--version  Show version information

  analyze    Analyze source code
  catalogue  Create csv file catalogue of rules
  pack       Pack rules into a single file
  test       Run tests for rules
  verify     Verify integrity and syntax of rules

Use "devskim [command] --help" for more information about a command.

Installation on mega-linter Docker image

  • Dockerfile commands :
RUN wget --tries=5 -q -O \
    && chmod +x \
    && ./ --install-dir /usr/share/dotnet -channel 6.0 -version latest

ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet"
RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI