packages feed

dhscanner-bitcode 2.2.0 → 2.3.0

raw patch · 2 files changed

+83/−82 lines, 2 filesdep ~dhscanner-astPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: dhscanner-ast

API changes (from Hackage documentation)

+ Callable: [hostingClassAnnotations] :: MethodContent -> [Annotation]
- Callable: MethodContent :: MethodName -> ClassName -> [HostingClassSuper] -> Cfg -> [Annotation] -> Location -> Word -> MethodContent
+ Callable: MethodContent :: MethodName -> ClassName -> [HostingClassSuper] -> [Annotation] -> Cfg -> [Annotation] -> Location -> Word -> MethodContent

Files

dhscanner-bitcode.cabal view
@@ -1,82 +1,82 @@-cabal-version:      3.12-name:               dhscanner-bitcode-category:           sast-synopsis:           Intermediate language for static code analysis-description:--    The [intermediate language \/ intermediate representation \/ bitcode](https://en.wikipedia.org/wiki/Intermediate_representation#Intermediate_language)-    (IL \/ IR \/ bitcode) is a data structure able to represent code originating from /multiple/-    programming languages. Its main purpose is to enable an efficient and uniform /static code analysis/,-    as part of the [dhscanner](https://github.com/OrenGitHub/dhscanner) framework-    for [CI/CD](https://en.wikipedia.org/wiki/CI/CD) container security checks.-    As part of that framework, it targets mostly languages used for /cloud native applications/:-    __Python__, __Ruby__, __Php__, __Javascript__, __Typescript__, __Java__, __C#__ and __Golang__.-    Typically, a collection of files are first parsed using relevant-    [parsers](https://github.com/OrenGitHub/dhscanner.1.parsers), then,-    the resulting collection of abstract syntax trees is sent to code generation,-    where it is translated into a collection of /callables/.-    A callable is a sequence of commands corresponding to either a function, a method-    or (in languages like python) a script. The design of commands was done with simplicity-    in mind. The commands resemble an abstract RISC-style assembley, motivated by keeping-    later-phases analyses as simple as possible.--version:            2.2.0-license:            GPL-3.0-only-license-file:       LICENSE-author:             OrenGitHub-maintainer:         Oren Ish Shalom-copyright:          (c) 2024 Oren Ish Shalom-homepage:           https://github.com/OrenGitHub/dhscanner-stability:          experimental-build-type:         Simple--common ghc_options-    ghc-options: -Wall -Werror=incomplete-patterns -O2--library--    import:-        ghc_options--    exposed-modules:-        Bitcode,-        Callable,-        Cfg,-        Fqn--    build-depends:-        aeson >= 2.2 && < 2.4,-        base >= 4.22 && < 4.23,-        containers >= 0.8 && < 0.9,-        dhscanner-ast >= 1.3.1 && < 1.4--    hs-source-dirs:-        src--    default-language:-        GHC2024--test-suite dhscanner-bitcode-test--    import:-        ghc_options--    type:-        exitcode-stdio-1.0--    hs-source-dirs:-        test--    main-is:-        Main.hs--    build-depends:-        base,-        dhscanner-ast,-        dhscanner-bitcode,-        containers,-        QuickCheck,-        random--    default-language:-        GHC2024+cabal-version:      3.12
+name:               dhscanner-bitcode
+category:           sast
+synopsis:           Intermediate language for static code analysis
+description:
+
+    The [intermediate language \/ intermediate representation \/ bitcode](https://en.wikipedia.org/wiki/Intermediate_representation#Intermediate_language)
+    (IL \/ IR \/ bitcode) is a data structure able to represent code originating from /multiple/
+    programming languages. Its main purpose is to enable an efficient and uniform /static code analysis/,
+    as part of the [dhscanner](https://github.com/OrenGitHub/dhscanner) framework
+    for [CI/CD](https://en.wikipedia.org/wiki/CI/CD) container security checks.
+    As part of that framework, it targets mostly languages used for /cloud native applications/:
+    __Python__, __Ruby__, __Php__, __Javascript__, __Typescript__, __Java__, __C#__ and __Golang__.
+    Typically, a collection of files are first parsed using relevant
+    [parsers](https://github.com/OrenGitHub/dhscanner.1.parsers), then,
+    the resulting collection of abstract syntax trees is sent to code generation,
+    where it is translated into a collection of /callables/.
+    A callable is a sequence of commands corresponding to either a function, a method
+    or (in languages like python) a script. The design of commands was done with simplicity
+    in mind. The commands resemble an abstract RISC-style assembley, motivated by keeping
+    later-phases analyses as simple as possible.
+
+version:            2.3.0
+license:            GPL-3.0-only
+license-file:       LICENSE
+author:             OrenGitHub
+maintainer:         Oren Ish Shalom
+copyright:          (c) 2024 Oren Ish Shalom
+homepage:           https://github.com/OrenGitHub/dhscanner
+stability:          experimental
+build-type:         Simple
+
+common ghc_options
+    ghc-options: -Wall -Werror=incomplete-patterns -O2
+
+library
+
+    import:
+        ghc_options
+
+    exposed-modules:
+        Bitcode,
+        Callable,
+        Cfg,
+        Fqn
+
+    build-depends:
+        aeson >= 2.2 && < 2.4,
+        base >= 4.22 && < 4.23,
+        containers >= 0.8 && < 0.9,
+        dhscanner-ast >= 1.5.0 && < 1.6
+
+    hs-source-dirs:
+        src
+
+    default-language:
+        GHC2024
+
+test-suite dhscanner-bitcode-test
+
+    import:
+        ghc_options
+
+    type:
+        exitcode-stdio-1.0
+
+    hs-source-dirs:
+        test
+
+    main-is:
+        Main.hs
+
+    build-depends:
+        base,
+        dhscanner-ast,
+        dhscanner-bitcode,
+        containers,
+        QuickCheck,
+        random
+
+    default-language:
+        GHC2024
src/Callable.hs view
@@ -67,6 +67,7 @@          methodName :: Token.MethodName,
          hostingClassName :: Token.ClassName,
          hostingClassSupers :: [ HostingClassSuper ],
+         hostingClassAnnotations :: [ Annotation ],
          methodBody :: Cfg,
          methodAnnotations :: [ Annotation ],
          methodLocation :: Location,