Giter VIP home page Giter VIP logo

semgrep-idea-plugin's Introduction

semgrep-idea-plugin

Build Version Downloads

Description

The semgrep-idea-plugin is a simple wrapper tool for the Semgrep tool (see GitHub). This should allow you to work in your code environment as you normally would, and receive semgrep notifications in the IDE.

This is a simple wrapper for the semgrep open source tool. See https://github.com/jtmelton/semgrep-idea-plugin for more details.

Installation

  • Using IDE built-in plugin system:

    Preferences > Plugins > Marketplace > Search for "semgrep-idea-plugin" > Install Plugin

  • Manually:

    Download the latest release and install it manually using Preferences > Plugins > โš™๏ธ > Install plugin from disk...

Configuration

  • semgrep-wrapper:

    At the moment you need to create a wrapper for the semgrep tool. This is necessary because the IDEA plugin has issues with the python env. Having said that, this may change in the future. The key pieces here are that you should:

    • include the full path to semgrep
    • add the json parameter - we expect to parse the json blob to report findings
    • expect 2 parameters: 1) rules file/directory, and 2) file to analyze
       #!/bin/sh
       
       export PATH="/usr/local/Cellar/semgrep/0.31.1/bin/:$PATH"
       
       if [ "$#" -ne 2 ]; then
           echo "You must enter exactly 2 command line arguments: the rules file/dir first, and the file to analyze second"
       fi
       
       /usr/local/Cellar/semgrep/0.31.1/bin/semgrep --config $1 $2 --json --error
    
  • Binary path setting:

    To update this setting,

    • Go to CMD + , or CTRL + , or Intellij IDEA -> Preferences
    • Go to Tools
    • Go to Semgrep Settings
    • Set "Binary / Run Script Location (fully qualified file path): "

    In this field you should enter the fully qualified path to the semgrep-wrapper file you created in the step above

  • Binary path setting:

    To update this setting,

    • Go to CMD + , or CTRL + , or Intellij IDEA -> Preferences
    • Go to Tools
    • Go to Semgrep Settings
    • Set "Rules Location (fully qualified file path): "

    In this field you should enter the fully qualified path to the semgre rules file or a directory containing one or more semgrep rules files


Plugin based on the IntelliJ Platform Plugin Template.

semgrep-idea-plugin's People

Contributors

jtmelton avatar guifre avatar actions-user avatar

Watchers

James Cloos avatar

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.