Spectra Assure
Community
warningRisk: Hardening
Scanned: 23 days ago

ast-grep-cli

Artifact:
latest
Top 10k
Structural Search and Rewrite code at large scale using precise AST pattern.
License: Permissive (MIT)
Published: 23 days ago




SAFE Assessment

Compliance

Licenses
No license compliance issues
Secrets
No sensitive information found

Security

Vulnerabilities
No known vulnerabilities detected
Hardening
5 misconfigured toolchains detected

Threats

Tampering
No evidence of software tampering
Malware
No evidence of malware inclusion

INCIDENTS FOR THIS VERSION:

Popularity

7.76M
Total Downloads
Contributor
Declared Dependencies
7
Dependents

Top issues

Problem

Security Development Lifecycle (SDL) is a group of enhanced compile-time checks that report common coding mistakes as errors. These checks prevent the use of hard-to-secure string manipulation functions. They enforce static memory access checks, and allow only the use of range-verified string parsing functions. While these checks do not prevent every memory corruption issue by themselves, they do help reduce the likelihood.

Prevalence in PyPI community

10 packages
found in
Top 100
45 packages
found in
Top 1k
247 packages
found in
Top 10k
4.13k packages
in community

Next steps

It's highly recommended to enable these checks for all software components used at security boundaries, or those that process user controlled inputs.
To enable these checks, refer to your programming language toolchain documentation.
In Microsoft VisualStudio, you can enable this feature by setting the compiler option /SDL to ON.

Problem

Uniform Resource Locators (URLs) are structured addresses that point to locations and assets on the internet. URLs allow software developers to build complex applications that exchange data with servers that can be hosted in multiple geographical regions. URLs can commonly be found embedded in documentation, configuration files, source code and compiled binaries. One or more embedded URLs were discovered to link to raw files hosted on GitHub. Attackers often abuse popular web services to host malicious payloads. Since code-sharing services URLs are typically allowed by security solutions, using them for payload delivery increases the odds that the malicious code will reach the user. While the presence of code-sharing service locations does not imply malicious intent, all of their uses in a software package should be documented and approved. An increasing number of software supply chain attacks in the open source space leverages the GitHub service to deliver malicious payloads.

Prevalence in PyPI community

36 packages
found in
Top 100
219 packages
found in
Top 1k
1678 packages
found in
Top 10k
63.41k packages
in community

Next steps

Investigate reported detections.
If the software should not include these network references, investigate your build and release environment for software supply chain compromise.
You should delay the software release until the investigation is completed, or until the issue is risk accepted.
Consider an alternative delivery mechanism for software packages.

Problem

Security Development Lifecycle (SDL) is a group of enhanced compile-time checks that report common coding mistakes as errors, preventing them from reaching production. These checks minimize the number of security issues by enforcing strict memory access checks. They also prevent the use of hard-to-secure string and memory manipulation functions. To prove the binary has been compiled with these checks enabled, the compiler emits a special debug object. Removing the debug table eliminates this proof. Therefore, this check only applies to binaries that still have their debug tables.

Prevalence in PyPI community

12 packages
found in
Top 100
63 packages
found in
Top 1k
326 packages
found in
Top 10k
7.08k packages
in community

Next steps

You should keep the debug table to prove that the SDL process has been followed.
To enable these checks, refer to your programming language toolchain documentation.
In Microsoft VisualStudio, you can enable this feature by setting the compiler option /SDL to ON.

Problem

Security Development Lifecycle (SDL) is a group of enhanced compile-time checks that report common coding mistakes as errors. These checks prevent the use of hard-to-secure memory manipulation functions. They enforce static memory access checks, and allow only the use of range-verified memory access functions. While these checks do not prevent every memory corruption issue by themselves, they do help reduce the likelihood.

Prevalence in PyPI community

4 packages
found in
Top 100
45 packages
found in
Top 1k
242 packages
found in
Top 10k
5.25k packages
in community

Next steps

It's highly recommended to enable these checks for all software components used at security boundaries, or those that process user controlled inputs.
To enable these checks, refer to your programming language toolchain documentation.
In Microsoft VisualStudio, you can enable this feature by setting the compiler option /SDL to ON.

Problem

Control Flow Guard (CFG/CFI) protects the code flow integrity by ensuring that indirect calls are made only to vetted functions. This mitigation protects dynamically resolved function targets by instrumenting the code responsible for transferring execution control. Higher-level programming languages implement structured exception handling by managing their own code flow execution paths. As such, they are subject to code flow hijacking during runtime. Language-specific exception handling mitigation enforces execution integrity by instrumenting calls to manage execution context switching. Any deviation from the known and trusted code flow paths will cause the application to terminate. This makes malicious code less likely to execute.

Prevalence in PyPI community

36 packages
found in
Top 100
164 packages
found in
Top 1k
932 packages
found in
Top 10k
17.86k packages
in community

Next steps

It's highly recommended to enable this option for all software components used at security boundaries, or those that process user controlled inputs.
To enable this mitigation, refer to your programming language toolchain documentation.
In Microsoft VisualStudio, you can enable CFG mitigation by passing the /guard:cf parameter to the compiler and linker.

Top behaviors

Prevalence in PyPI community

Behavior often found in this community (Common)
36 packages
found in
Top 100
219 packages
found in
Top 1k
1678 packages
found in
Top 10k
63.42k packages
in community

Prevalence in PyPI community

Behavior often found in this community (Common)
34 packages
found in
Top 100
181 packages
found in
Top 1k
1324 packages
found in
Top 10k
54.83k packages
in community

Prevalence in PyPI community

Behavior often found in this community (Common)
37 packages
found in
Top 100
167 packages
found in
Top 1k
1008 packages
found in
Top 10k
21.72k packages
in community

Prevalence in PyPI community

Behavior often found in this community (Common)
5 packages
found in
Top 100
34 packages
found in
Top 1k
187 packages
found in
Top 10k
3.48k packages
in community

Prevalence in PyPI community

Behavior often found in this community (Common)
6 packages
found in
Top 100
34 packages
found in
Top 1k
192 packages
found in
Top 10k
3.92k packages
in community

Top vulnerabilities

No vulnerabilities found.