semgr8ns / semgr8s

Semgrep-based Policy Controller for Kubernetes
https://semgr8ns.github.io/semgr8s/
Apache License 2.0
5 stars 0 forks source link

update: bump semgrep from 1.74.0 to 1.75.0 in the pip-packages group #269

Closed dependabot[bot] closed 3 months ago

dependabot[bot] commented 3 months ago

Bumps the pip-packages group with 1 update: semgrep.

Updates semgrep from 1.74.0 to 1.75.0

Release notes

Sourced from semgrep's releases.

Release v1.75.0

1.75.0 - 2024-06-03

Added

  • Pro: Semgrep can now track taint through tuple/list (un)packing intra-procedurally (i.e., within a single function). For example:

    t = ["ok", "taint"]
    x, y = t
    sink(x) # OK, no finding
    sink(y) # tainted, finding
    ``` (code-6935)
    
  • Optional type matching is supported in the Pro engine for Python. For example, in Python, Optional[str], str | None, and Union[str, None] represent the same type but in different type expressions. The optional type match support enables matching between these expressions, allowing any optional type expression to match any other optional type expression when used with metavariable-type filtering. It's important to note that syntactic pattern matching still distinguishes between these types. (code-6939)

  • Add support for pnpm v9 (pnpm)

  • Added a new rule option decorators_order_matters, which allows users to make decorators/ non-keyword attributes matching stricter. The default matching for attributes is order-agnostic, but if this rule option is set to true, non-keyword attributes (e.g. decorators in Python) will be matched in order, while keyword attributes (e.g. static, inline, etc) are not affected.

    An example usage will be a rule to detect any decorator that is outside of the route() decorator in Flask, since any decorator outside of the route() decorator takes no effect.

    bad: another.func() takes no effect

    @​another.func("func") @​app.route("route") def f(): pass

    ok: route() is the outermost decorator

    @​app.route("route") @​another.func("func") def f(): pass (saf-435)

Fixed

  • Pro: taint-mode: Fixed issue causing findings to be missed (false negatives) when a global or class field was tainted, and then used in a sink after two or more function calls.

    For example:

... (truncated)

Changelog

Sourced from semgrep's changelog.

1.75.0 - 2024-06-03

Added

  • Pro: Semgrep can now track taint through tuple/list (un)packing intra-procedurally (i.e., within a single function). For example:

    t = ["ok", "taint"]
    x, y = t
    sink(x) # OK, no finding
    sink(y) # tainted, finding
    ``` (code-6935)
    
  • Optional type matching is supported in the Pro engine for Python. For example, in Python, Optional[str], str | None, and Union[str, None] represent the same type but in different type expressions. The optional type match support enables matching between these expressions, allowing any optional type expression to match any other optional type expression when used with metavariable-type filtering. It's important to note that syntactic pattern matching still distinguishes between these types. (code-6939)

  • Add support for pnpm v9 (pnpm)

  • Added a new rule option decorators_order_matters, which allows users to make decorators/ non-keyword attributes matching stricter. The default matching for attributes is order-agnostic, but if this rule option is set to true, non-keyword attributes (e.g. decorators in Python) will be matched in order, while keyword attributes (e.g. static, inline, etc) are not affected.

    An example usage will be a rule to detect any decorator that is outside of the route() decorator in Flask, since any decorator outside of the route() decorator takes no effect.

    bad: another.func() takes no effect

    @​another.func("func") @​app.route("route") def f(): pass

    ok: route() is the outermost decorator

    @​app.route("route") @​another.func("func") def f(): pass (saf-435)

Fixed

  • Pro: taint-mode: Fixed issue causing findings to be missed (false negatives) when a global or class field was tainted, and then used in a sink after two or more function calls.

    For example:

    class Test {
    

... (truncated)

Commits
  • 2e0ca3f chore: Bump version to 1.75.0
  • d10868a build-semgrep-pro: restore using the OSS from the PR (semgrep/semgrep-proprie...
  • 0bd7ad4semgrep/semgrep-proprietary#1
  • b9fb140 fix: Fall back when unable to infer type from svalue (semgrep/semgrep-proprie...
  • 788cab2 feat: add new rule option for stricter attributes matching (semgrep/semgrep-p...
  • a18fbf1semgrep/semgrep-proprietary#1621
  • 5f49461semgrep/semgrep-proprietary#1592
  • 92200a5 build-semgrep-pro: restore using the OSS from the PR
  • c3f5e89semgrep/semgrep-proprietary#1624
  • b64bfae Revert some of austin change, remove notty from semgrep.opam (semgrep/semgrep...
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
github-actions[bot] commented 3 months ago

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 6a26f975ad9c4e103628d636b3e71eda5a6a73a2.

Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

OpenSSF Scorecard

PackageVersionScoreDetails
pip/semgrep 1.75.0 UnknownUnknown
pip/semgrep 1.74.0 UnknownUnknown
pip/semgrep 1.75.0 UnknownUnknown
pip/semgrep 1.74.0 UnknownUnknown

Scanned Manifest Files

poetry.lock
  • semgrep@1.75.0
  • semgrep@1.74.0
pyproject.toml
  • semgrep@1.75.0
  • semgrep@1.74.0
github-actions[bot] commented 3 months ago

Coverage

Coverage Report
FileStmtsMissCoverMissing
semgr8s
   __main__.py16160%5–29
   app.py78396%116, 176–177
   k8s_api.py22291%43–44
   updater.py29293%49–50
TOTAL1972388% 

Tests Skipped Failures Errors Time
18 0 :zzz: 0 :x: 0 :fire: 2.188s :stopwatch:
dependabot[bot] commented 3 months ago

Looks like semgrep is updatable in another way, so this is no longer needed.