returntocorp

Rules (2108)

Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.

Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.

this function is only available on Python 3.7+

Make sure that unverified user data can not reach vm instance.

Make sure that unverified user data can not reach `vm2`.

Make sure that unverified user data can not reach vm.compileFunction.

Make sure that unverified user data can not reach vm.runInContext.

Make sure that unverified user data can not reach vm.runInNewContext.

Make sure that unverified user data can not reach `vm2`.

You probably want the structural inequality operator =

You probably want the structural inequality operator <>

This is always true. If testing for floating point NaN, use `Float.is_nan` instead.

Useless if. Both branches are equal.

Useless let

You should probably use Filename.get_temp_dirname().

You probably want $X <> [], which is faster.

Packages in base containers should be up-to-date, removing the need to upgrade or dist-upgrade. If a package is out of date, contact the maintainers.

Using '--platform' with FROM restricts the image to build on a single platform. Further, this must be the same as the build platform. If you intended to specify the target platform, use the utility 'docker buildx --platform=' instead.

Some commands such as `$CMD` do not make sense in a container. Do not use these.

'apt-get' is preferred as an unattended tool for stability. 'apt' is discouraged.

Packages in base images should be up-to-date, removing the need for 'apk upgrade'. If packages are out-of-date, consider contacting the base image maintainer.

Packages in base images should be up-to-date, removing the need for 'dnf update'. If packages are out-of-date, consider contacting the base image maintainer.

Packages in base images should be up-to-date, removing the need for 'yum update'. If packages are out-of-date, consider contacting the base image maintainer.

Packages in base images should be up-to-date, removing the need for 'zypper update'. If packages are out-of-date, consider contacting the base image maintainer.

MAINTAINER has been deprecated.

This apk command is missing '--no-cache'. This forces apk to use a package index instead of a local package cache, removing the need for '--update' and the deletion of '/var/cache/apk/*'. Add '--no-cache' to your apk command.

This 'dnf install' is missing the '-y' switch. This might stall builds because it requires human intervention. Add the '-y' switch.

This dnf command does not end with '&& dnf clean all'. Running 'dnf clean all' will remove cached data and reduce package size. (This must be performed in the same RUN step.)

This 'apt-get install' is missing '--no-install-recommends'. This prevents unnecessary packages from being installed, thereby reducing image size. Add '--no-install-recommends'.

This 'yum install' is missing the '-y' switch. This might stall builds because it requires human intervention. Add the '-y' switch.

This yum command does not end with '&& yum clean all'. Running 'yum clean all' will remove cached data and reduce package size. (This must be performed in the same RUN step.)

This 'zypper install' is missing the '-y' switch. This might stall builds because it requires human intervention. Add the '-y' switch.

Prefer JSON notation when using CMD or ENTRYPOINT. This allows signals to be passed from the OS.

Warning MONGODB-CR was deprecated with the release of MongoDB 3.6 and is no longer supported by MongoDB 4.0 (see https://api.mongodb.com/python/current/examples/authentication.html for details).

path for `$URL` is uselessly assigned twice

path for `$URL` is assigned twice with different names

The path for `$URL` is assigned once to view `$VIEW` and once to `$DIFFERENT_VIEW`, which can lead to unexpected behavior. Verify what the intended target view is and delete the other route.

The name `$NAME` is used for both `$URL` and `$OTHER_URL`, which can lead to unexpected behavior when using URL reversing. Pick a unique name for each path.

Two identical pattern clauses were detected. This will cause Semgrep to run the same pattern twice. Remove one of the duplicate pattern clauses.

This rule has an empty message field. Consider adding a message field that communicates why this rule is an issue and how to fix it. This will increase the chance that the finding gets addressed.

The `owasp` tag in Semgrep rule metadata should start with the format "A00:YYYY", where A00 is the OWASP top ten number and YYYY is the OWASP top ten year.

The references in rule metadata should always be a list, even if there's only one.

You can not use 'pattern' $A and 'pattern-not' $A together; this will always be empty.

$...CWE The cwe tag in rule metadata should always be in the format "CWE-000: Title".

Lazy loading can complicate code bundling if care is not taken, also `require`s are run synchronously by Node.js. If they are called from within a function, it may block other requests from being handled at a more critical time. The best practice is to `require` modules at the beginning of each file, before and outside of any functions.

Using == on char* performs pointer comparison, use strcmp instead

Semgrep found a bash reverse shell

Images should be tagged with an explicit version to produce deterministic container images.

Attribute $ATT is read from two different sources: '$X.$ATT' and '$Y.$ATT'. Make sure this is intended, as this could cause logic bugs if they are treated as if they are the same object.

This Semgrep rule is missing a valid 'category' field in the 'metadata'. 'category' must be one of 'security', 'correctness', 'best-practice', 'performance', 'maintainability', or 'portability'.

Unnecessary parent operator. Remove one to fix.

This Semgrep rule is missing a 'technology' field in the 'metadata'. Consider adding a list of technologies based on the rule's associated library or framework, or another piece of relevant information.

This is always true. If testing for floating point NaN, use `Float.is_nan` instead.

Useless if. Both branches are equal.

Useless let

You should probably use Filename.get_temp_dirname().

The ADD command will accept and include files from a URL. This potentially exposes the container to a man-in-the-middle attack. Since ADD can have this and other unexpected side effects, the use of the more explicit COPY command is preferred.

When you set a fractional CPU limit on a container, the CPU cycles available will be throttled, even though most nodes can handle processes alternating between using 100% of the CPU.

Using the ellipsis operator `...` at the top of the pattern drastically slows down the rule performance.

'input_line' leaves a '\r' (CR) character when reading lines from a Windows text file, whose lines end in "\r\n" (CRLF). This is a problem for any Windows file that is being read either on a Unix-like platform or on Windows in binary mode. If the code already takes care of removing any trailing '\r' after reading the line, add a '(* nosemgrep *)' comment to disable this warning.

'open_in' behaves differently on Windows and on Unix-like systems with respect to line endings. To get the same behavior everywhere, use 'open_in_bin' or 'open_in_gen [Open_binary]'. If you really want CRLF-to-LF translations to take place when running on Windows, use 'open_in_gen [Open_text]'.

'open_out' behaves differently on Windows and on Unix-like systems with respect to line endings. To get the same behavior everywhere, use 'open_out_bin' or 'open_out_gen [Open_binary]'. If you really want LF-to-CRLF translations to take place when running on Windows, use 'open_out_gen [Open_text]'.

This application has anti CSRF protection which prevents cross site request forgery attacks.

X-Permitted-Cross-Domain-Policies header set to off. More information: https://helmetjs.github.io/docs/crossdomain/

Content Security Policy header is present. More Information: https://helmetjs.github.io/docs/csp/

Expect-CT header is present. More information: https://helmetjs.github.io/docs/expect-ct/

X-DNS-Prefetch-Control header is present and DNS Prefetch Control is enabled. More information: https://helmetjs.github.io/docs/dns-prefetch-control/

Feature-Policy header is present. More information: https://helmetjs.github.io/docs/feature-policy/

X-Frame-Options header is present. More information: https://helmetjs.github.io/docs/frameguard/

HSTS header is present. More information: https://helmetjs.github.io/docs/hsts/

X-Download-Options header is present. More information: https://helmetjs.github.io/docs/ienoopen/

Content-Type-Options header is present. More information: https://helmetjs.github.io/docs/dont-sniff-mimetype/

Referrer-Policy header is present. More information: https://helmetjs.github.io/docs/referrer-policy/

Default X-Powered-By is removed or modified. More information: https://helmetjs.github.io/docs/hide-powered-by/

X-XSS-Protection header is present. More information: https://helmetjs.github.io/docs/xss-filter/

This application has API rate limiting controls.

The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination. Many different options exit to fix this issue depending the use case (Application can send request only to identified and trusted applications, Application can send requests to ANY external IP address or domain name). Refer to https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html for more information on how to fiw each case.

Potential inter-process write of RegionInfo $RI via $PIPESTREAM $P that was instantiated with a two-character culture code $REGION. Per .NET documentation, if you want to persist a RegionInfo object or communicate it between processes, you should instantiate it by using a full culture name rather than a two-letter ISO region code.

When performing yarn install, make sure to use the lockfile. Without `--frozen-lockfile`, yarn will update the lockfile rather than using the pinned versions.

Calling setState on the current state is always a no-op. Did you mean to change the state like $Y(!$X) instead?

DES is considered deprecated. AES is the recommended cipher. Upgrade to use AES. See https://www.nist.gov/news-events/news/2005/06/nist-withdraws-outdated-data-encryption-standard for more information.

Triple DES (3DES or DESede) is considered deprecated. AES is the recommended cipher. Upgrade to use AES. See https://csrc.nist.gov/News/2017/Update-to-Current-Use-and-Deprecation-of-TDEA for more information.

This comparison is useless because the expressions being compared are identical. This is expected to always return the same result, 0, unless your code is really strange.

Having a `break`, `continue`, or `return` in a `finally` block will cause strange behaviors, like exceptions not being caught.

It looks like no matter how $CONDITION is evaluated, this expression returns $ANS. This is probably a copy-paste error.

This Gitlab CI YAML will never run on default branches due to a `changes` rule with `when:never`. To fix this, make sure the triggering event is a push event. You can do this with `if: '$CI_PIPELINE_SOURCE == "push"'`. See https://docs.gitlab.com/ee/ci/yaml/index.html#ruleschanges

Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'bash' instead.

Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'cpp' instead.

Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'csharp' instead.

Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'dockerfile' instead.

Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'elixir' instead.

Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'go' instead.

Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'hcl' instead.

Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'js' instead.

Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'kotlin' instead.

Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'python' instead.

Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'regex' instead.

Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'solidity' instead.

Found '$X' in language config which diverges from semgrep.dev normalization. Please use 'ts' instead.

This rule has a multi-line message field, which may display poorly in a terminal. Consider ensuring it is on one line. For example, use `message: >-`, not `message: |`.