Skip to content

Releases: semgrep/semgrep-interfaces

Release v1.85.0

15 Aug 17:56
6dafb87
Compare
Choose a tag to compare

1.85.0 - 2024-08-15

Added

  • Semgrep now recognizes files ending with the extention .tfvars as terraform files (saf-1481)

Changed

  • The use of --debug will not generate anymore profiling information.
    Use --time instead. (debug)
  • Updated link to the Supply Chain findings page on Semgrep AppSec Platform to filter to the specific repository and ref the findings are detected on. (secw-2395)

Fixed

  • Fixed an error with julia list comprehentions where the pattern:

    [$A for $B in $C]
    

    would match

    [x for y in z]

    However we would only get one binding [$A/x]

    Behavior after fix: we get three bindings [$A/x,$B/y,$C/z] (saf-1480)

Release v1.84.1

07 Aug 23:20
3daef49
Compare
Choose a tag to compare

1.84.1 - 2024-08-07

No significant changes.

Release v1.84.0

06 Aug 21:04
3daef49
Compare
Choose a tag to compare

1.84.0 - 2024-08-06

Changed

  • We switch from magenta to yellow when highlighting matches
    with the medium or warning severity. We now use magenta for
    cricical severity to be consistent with other tools such
    as npm. (color)

Fixed

  • Workaround deadlock when interfile is run with j>1 and tracing is enabled. (saf-1157)
  • Fixed file count to report the accurate number of files scanned by generic & regex
    so that no double counting occurs. (saf-507)

Release v1.83.0

02 Aug 13:08
9e0f3be
Compare
Choose a tag to compare

1.83.0 - 2024-08-02

Added

  • Dockerfile: Allow Semgrep Ellipsis (...) in patterns for HEALTHCHECK commands. (saf-1441)

Fixed

  • The use of --debug should generate now far less log entries.
    Moreover, when the number of ignored files, or rules, or
    other entities exceed a big number, we instead replace them
    with a in the output to keep the output of semgrep
    small. (debuglogs)
  • Fixed a bug introduced in 1.81.0 which caused files ignored for the Code
    product but not the Secrets product to fail to be scanned for secrets.
    Files that were not ignored for either product were not affected. (saf-1459)

Release v1.82.0

30 Jul 21:40
9e0f3be
Compare
Choose a tag to compare

1.82.0 - 2024-07-30

Added

  • Added testsuite/ as a filepath to the default value for .semgrepignore. (gh-1876)

Changed

  • Update the library definitions for Java for the latest version of the JDK. (java-library-definitions)

Fixed

  • Fixed metavariable comparison in step mode.

    Used to be that the rule:

        steps:
            - languages: [python]
              patterns:
                - pattern: x = f($VAR);
            - languages: [generic]
              patterns:
                - pattern-either:
                   - patterns:
                    - pattern: HI $VAR

    Wouldn't match, as one is an identifier, and the other an expression that has a
    string literal. The fix was chainging the equality used. (saf-1061)

Release v1.81.0

24 Jul 12:18
9e0f3be
Compare
Choose a tag to compare

1.81.0 - 2024-07-24

Changed

  • The --debug option will now display logging information from the semgrep-core
    binary directly, without waiting that the semgrep-core program finish. (incremental_debug)

Fixed

  • C++: Scanning a project with header files (.h) now no longer causes a
    spurious warnings that the file is being skipped, or not analyzed. (code-6899)

  • Semgrep will now be more strict (as it should be) when unifying identifiers.

    Patterns like the one below may not longer work, particularly in Semgrep Pro:

    patterns:
      - pattern-inside: |
          class A:
            ...
            def $F(...):
              ...
            ...
          ...
      - pattern-inside: |
          class B:
            ...
            def $F(...):
              ...
            ...
          ...
    

    Even if two classes A and B may both have a method named foo, these methods
    are not the same, and their ids are not unifiable via $F. The right way of doing
    this in Semgrep is the following:

    patterns:
      - pattern-inside: |
          class A:
            ...
            def $F1(...):
              ...
            ...
          ...
      - pattern-inside: |
          class B:
            ...
            def $F2(...):
              ...
            ...
          ...
      - metavariable-comparison:
          comparison: str($F1) == str($F2)
    

    We use a different metavariable to match each method, then we check whether they
    have the same name (i.e., same string). (code-7336)

  • In the app, you can configure Secrets ignores separately from Code/SSC ignores. However, the
    files that were ignored by Code/SSC and not Secrets were still being scanned during the
    preprocessing stage for interfile analysis. This caused significantly longer scan times than
    expected for some users, since those ignored files can ignore library code. This PR fixes that
    behavior and makes Code/SSC ignores apply as expected. (saf-1087)

  • Fixed typo that prevented users from using "--junit-xml-output" flag and added a tests that invokes the flag. (saf-1437)

Release v1.80.0

18 Jul 10:05
fd5d2b0
Compare
Choose a tag to compare

1.80.0 - 2024-07-18

Added

  • OSemgrep now can take --exclude-minified-files to skip minified files. Additionally --no-exclude-minified-files will disable this option. It is off by default. (cdx-460)

  • Users are now required to login before using semgrep scan --pro.

    Previously, semgrep will tell the users to log in, but the scan will still continue.

    With this change, semgrep will tell the users to log in and stop the scan. (saf-1137)

Fixed

  • The language server no longer scans large or minified files (cdx-460)

  • Pro: Improved module resolution for Python. Imports like from a.b import c where
    c is a module will now be resolved by Semgrep. And, if a module cannot be found
    in the search path, Semgrep will try to heuristically resolve the module by matching
    the module specifier against the files that are being scanned. (code-7069)

  • A scan can occasionally freeze when using tracing with multiprocesses.

    This change disables tracing when scanning each target file unless the scan runs in a single process. (saf-1143)

  • Improved error handling for rules with invalid patterns. Now, scans will still complete and findings from other rules will be reported. (saf-789)

  • The "package-lock.json" parser incorrectly assumed that all paths in the "packages" component of "package-lock.json" started with "node_modules/".

    In reality, a dependency can be installed anywhere, so the parser was made more flexible to recognize alternative locations ("node_modules", "lib", etc). (sc-1576)

Release v1.79.0

10 Jul 10:05
f92c307
Compare
Choose a tag to compare

1.79.0 - 2024-07-10

Added

  • Preliminary support for the Move on Aptos language
    (see https://aptos.dev/move/move-on-aptos for more info on this language).
    Thanks a lot to Zhiping Liao (ArArgon) and Andrea Cappa for their contributions! (move_on_aptos)
  • The language server now reports number of autofixes and ignores triggered throught IDE integrations when metrics are enabled (pdx-autofix-ignore)
  • Added support for comparing Golang Pseudo-versions. After replacing calls to the
    packaging module with some custom logic, Pseudo-versions can now be compared against
    strict core versions and other pseudo versions accurately. (sc-1601)
  • We now perform a git gc as a side-effect of historical scans. (scrt-630)

Fixed

  • tainting: Fixed bug in --pro-intrafile that caused Semgrep to confuse a parameter
    with a top-level function with no arguments that happened to have the same name:

    def foo
      taint
    end
    
    def bar(foo)
      sink(foo) # no more FP here
    end (code-6923)
    
  • Fixed fatal errors on files containing nosemgrep annotation without
    any rule ID after. (nosemgrep_exn)

  • Matching explanations: Focus nodes now appear after filter nodes, which is
    the correct order of execution of pattern nodes. Filter nodes are now
    unreversed. (saf-1127)

  • Autofix: Previews in the textual CLI output will now join differing lines
    with a space, rather than joining with no whitespace whatsoever. (saf-1135)

  • Secrets: resolved some rare instances where historical scans would skip blobs
    depending on the structure of the local copy of the repository (i.e., blobs
    were only skipped if the specific copy of the git store had a certain
    structure). (scrt-630)

Release v1.78.0

27 Jun 23:26
dcb5d77
Compare
Choose a tag to compare

1.78.0 - 2024-06-27

Added

  • Matching of fully qualified type names in the metavariable-type operator has
    been improved. For example:

    from a.b import C
    
    x = C()
    

    The type of x will match both a.b.C and C.

      - pattern: $X = $Y()
      - metavariable-type:
          metavariable: $X
          types:
            - a.b.C  # or C
    ``` (code-7269)
    
    
    

Fixed

  • Symbolic propagation now works on decorator functions, for example:

    x = foo
    @x() # this is now matched by pattern `@foo()`
    def test():
      pass (code-6634)
    
  • Fixed an issue where Python functions with annotations ending in endpoint,
    route, get, patch, post, put, delete, before_request or
    after_request (i.e., ones we associate with Flask) were incorrectly analyzed
    with the Code product in addition to the Secrets product when present in a file
    being ignored for Code analysis but included for Secrets. (scrt-609)

Release v1.77.0

24 Jun 20:42
dcb5d77
Compare
Choose a tag to compare

1.77.0 - 2024-06-24

Added

  • Semgrep will now report the id of the organization associated with logged in users when reporting metrics in the language server (cdx-508)

  • Pro: taint-mode: Improved index-sensitive taint tracking for tuple/list (un)packing.

    Example 1:

     def foo():
         return ("ok", taint)
    
     def test():
          x, y = foo()
          sink(x)  # nothing, no FP
          sink(y)  # finding
    

    Example 2:

     def foo(t):
          (x, y) = t
          sink(x)  # nothing, no FP
          sink(y)  # finding
    
     def test():
          foo(("ok", taint)) (code-6935)
    
  • Adds traces to help debug the performance of tainting. To send the traces added in the PR, pass
    --trace and also set the environment variable SEMGREP_TRACE_LEVEL=trace. To send them to a
    local endpoint instead of our default endpoint, use --trace-endpoint. (saf-1100)

Fixed

  • Fixed a bug in the generation of the control-flow graph for try statements that
    could e.g. cause taint to report false positives:

    def test():
        data = taint
        try:
            # Semgrep assumes that `clean` could raise an exception, but
            # even if it does, the tainted `data` will never reach the sink !
            data = clean(data)
        except Exception:
            raise Exception()
    
        # `data` must be clean here
        sink(data) # no more FP (flow-78)
    
  • The language server (and semgrep --experimental) should not report anymore errors from
    the metrics.semgrep.dev server such as "cannot read property 'map' of undefined". (metrics_error)

  • Fixed a bug in the gemfile.lock parser which causes Semgrep to miss direct
    dependencies whose package name does not end in a version constraint. (sc-1568)