Giter VIP home page Giter VIP logo

positivetechnologies / pt.pm Goto Github PK

View Code? Open in Web Editor NEW
59.0 10.0 12.0 12.01 MB

:black_small_square: An engine for searching patterns in the source code, based on Unified AST or UST. At present time C#, Java, PHP, PL/SQL, T-SQL, MySql, and JavaScript are supported. Patterns can be described within the code or using a DSL.

Home Page: https://www.ptsecurity.com/ru-ru/products/ai/

License: Other

C# 96.62% ASP 0.09% ANTLR 1.06% Java 0.66% PHP 0.45% JavaScript 0.01% PLSQL 0.79% Batchfile 0.01% HTML 0.01% Python 0.02% TSQL 0.28%
csharp java php plsql tsql javascript parsing conversion ast parse-trees

pt.pm's People

Contributors

codefather2 avatar dependabot[bot] avatar flippaa avatar gabriel-fallen avatar inkoit avatar kvanttt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pt.pm's Issues

Workflow refactoring

Move LastParseTree and LastUst to the returned object in Process method.
WorflowResult should have the following properties:

  • List of ParseTree
  • List of Ust
  • List of MatchingResultDto
  • Maybe list of read files SourceCode

Rewrite Java8 grammar

Translate not left-recursive rules to left-recursive ones due to the performance reason.
Check performance of rewritten grammar.

Move comparison logic from UstNode to separate classes

CompareTo returns a simple integer. It's not enough to an actual needs.

In some cases, it's necessary to return relative of absolute text spans except the result of the comparison (see IRelativeLocationPattern and IAbsoluteLocationPattern) and side effect text location used. It is necessary to get rid of them for all UstNode.

Move documentation to another repository

There are too many documentation files and articles in this repository.
Moving them to a separate repository will make maintaining more easier.
I suppose to name new repository as something like PT.PM.Doc.

Support PHP inside JavaScript inside PHP

Sample:

<script type="text/javascript">
    var common_query = '<?php echo PMA_escapeJsString(PMA_generate_common_url('', '', '&'));?>';
</script>

I suggest to find <?php ?> with regex, process and remove them. After that parse JS code fragment with convenient JS parser.

about cfg and pdg

hi,
I found cfg and pdg modul in this projecte,but they are not implemented。how can I implement such as simple defect analysis:

$a=_GET["taint"];
$b=$a;
echo $b;

or taint flow about interprocedural dependence analysis?any suggestion will be usefull!thanks a lot.

Implement UAST dump mode for PT.PM.Cli

Implement an additional PT.PM.Cli's operation mode --dump-uast which allows to serialize and dump UAST without any matching against patterns. Dump should be saved to the named pipe or stdout (console) and contain a set of pairs Full file name -> UAST serialized to JSON for all processed sources.

Javascript parse errors in Kendo UI Core project

Project: https://github.com/telerik/kendo-ui-core/tree/2017.1.223

Files with parsing errors:

  • gulpfile.js
  • build\gulp\gather-amd.js
  • build\gulp\kendo-version.js
  • build\gulp\license.js
  • build\gulp\uglify.js
  • build\gulp\wrap-umd.js
  • build\gulp\tasks\karma.js
  • docs_assets\javascripts\prettify.js
  • docs-aspnet-core_assets\javascripts\prettify.js
  • docs-aspnet-mvc_assets\javascripts\prettify.js
  • src\angular.min.js
  • src\jquery.min.js
  • tests\core\class.js
  • tests\data\datareader.js
  • tests\data\xmldatareader.js
  • tests\dropdownlist\knockout-min.js
  • tests\model\initialization.js
  • tests\mvvm\changing.js
  • tests\window\templates-fixture.html

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.