Giter Site home page Giter Site logo

Comments (5)

webschik avatar webschik commented on May 16, 2024

From v1.16.0 each rule contains a property metadata, e.g. https://github.com/webschik/tslint-config-security/blob/master/src/rules/tsrDetectBufferNoassertRule.ts#L39

from tslint-config-security.

MVrachev avatar MVrachev commented on May 16, 2024

I don't see the "descriptionDetails" property or "description" property.
What I get in normal output is:
image

I thought that I will have this in the JSON output but I don't:

[  
   {  
      "endPosition":{  
         "character":40,
         "line":11,
         "position":307
      },
      "failure":"eval with argument of type BinaryExpression",
      "name":"test/fixtures/typescript/vulnerable.js",
      "ruleName":"tsr-detect-eval-with-expression",
      "ruleSeverity":"ERROR",
      "startPosition":{  
         "character":9,
         "line":11,
         "position":276
      }
   },
   {  
      "endPosition":{  
         "character":11,
         "line":17,
         "position":465
      },
      "failure":"Found fs.open with non-literal argument at index 0",
      "name":"test/fixtures/typescript/vulnerable.js",
      "ruleName":"tsr-detect-non-literal-fs-filename",
      "ruleSeverity":"ERROR",
      "startPosition":{  
         "character":4,
         "line":17,
         "position":458
      }
   },
   {  
      "endPosition":{  
         "character":58,
         "line":5,
         "position":172
      },
      "failure":"Found possible SQL injection",
      "name":"test/fixtures/typescript/vulnerable.js",
      "ruleName":"tsr-detect-sql-literal-injection",
      "ruleSeverity":"ERROR",
      "startPosition":{  
         "character":16,
         "line":5,
         "position":130
      }
   }
]

Where do I access and see that data?

from tslint-config-security.

webschik avatar webschik commented on May 16, 2024

Hi @MVrachev ,

My mistake, metadata property is used only to generate documentation - https://palantir.github.io/tslint/develop/docs/

To the JSON output https://palantir.github.io/tslint/formatters/json/ I can pass only a failure string or the fix object (TSLint API)

from tslint-config-security.

MVrachev avatar MVrachev commented on May 16, 2024

So, that means that still, we can't access the "descriptionDetails" property from the command line?

One solution I think will be to pass "descriptionDetails" string into the failure string.

from tslint-config-security.

webschik avatar webschik commented on May 16, 2024

Yes

from tslint-config-security.

Related Issues (19)

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.