Skip to content

Commit a7103e4

Browse files
committed
docs: update documentation
Signed-off-by: Amine <[email protected]>
1 parent b352c95 commit a7103e4

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

src/macaron/malware_analyzer/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ When a heuristic fails, with `HeuristicResult.FAIL`, then that is an indicator b
5656
- **Description**: Checks if the package name is suspiciously similar to any package name in a predefined list of popular packages. The similarity check incorporates the Jaro-Winkler distance and considers keyboard layout proximity to identify potential typosquatting.
5757
- **Rule**: Return `HeuristicResult.FAIL` if the similarity ratio between the package name and any popular package name meets or exceeds a defined threshold; otherwise, return `HeuristicResult.PASS`.
5858
- **Dependency**: None.
59+
60+
11. **Fake Email**
61+
- **Description**: Checks if the package maintainer or author has a suspicious or invalid email .
62+
- **Rule**: Return `HeuristicResult.FAIL` if the email format is invalid or the email domain has no MX records ; otherwise, return `HeuristicResult.PASS`.
63+
- **Dependency**: None.
5964
### Source Code Analysis with Semgrep
6065
**PyPI Source Code Analyzer**
6166
- **Description**: Uses Semgrep, with default rules written in `src/macaron/resources/pypi_malware_rules` and custom rules available by supplying a path to `custom_semgrep_rules` in `defaults.ini`, to scan the package `.tar` source code.

src/macaron/slsa_analyzer/build_tool/gradle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2022 - 2024, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2022 - 2025, Oracle and/or its affiliates. All rights reserved.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
33

44
"""This module contains the Gradle class which inherits BaseBuildTool.
@@ -122,7 +122,7 @@ def get_dep_analyzer(self) -> CycloneDxGradle:
122122
raise DependencyAnalyzerError("No default dependency analyzer is found.")
123123
if not DependencyAnalyzer.tool_valid(defaults.get("dependency.resolver", "dep_tool_gradle")):
124124
raise DependencyAnalyzerError(
125-
f"Dependency analyzer {defaults.get('dependency.resolver','dep_tool_gradle')} is not valid.",
125+
f"Dependency analyzer {defaults.get('dependency.resolver', 'dep_tool_gradle')} is not valid.",
126126
)
127127

128128
tool_name, tool_version = tuple(

src/macaron/slsa_analyzer/build_tool/maven.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2022 - 2024, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2022 - 2025, Oracle and/or its affiliates. All rights reserved.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
33

44
"""This module contains the Maven class which inherits BaseBuildTool.
@@ -116,7 +116,7 @@ def get_dep_analyzer(self) -> CycloneDxMaven:
116116
raise DependencyAnalyzerError("No default dependency analyzer is found.")
117117
if not DependencyAnalyzer.tool_valid(defaults.get("dependency.resolver", "dep_tool_maven")):
118118
raise DependencyAnalyzerError(
119-
f"Dependency analyzer {defaults.get('dependency.resolver','dep_tool_maven')} is not valid.",
119+
f"Dependency analyzer {defaults.get('dependency.resolver', 'dep_tool_maven')} is not valid.",
120120
)
121121

122122
tool_name, tool_version = tuple(

src/macaron/slsa_analyzer/build_tool/pip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2023 - 2024, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2023 - 2025, Oracle and/or its affiliates. All rights reserved.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
33

44
"""This module contains the Pip class which inherits BaseBuildTool.
@@ -88,7 +88,7 @@ def get_dep_analyzer(self) -> DependencyAnalyzer:
8888
tool_name = "cyclonedx_py"
8989
if not DependencyAnalyzer.tool_valid(f"{tool_name}:{cyclonedx_version}"):
9090
raise DependencyAnalyzerError(
91-
f"Dependency analyzer {defaults.get('dependency.resolver','dep_tool_gradle')} is not valid.",
91+
f"Dependency analyzer {defaults.get('dependency.resolver', 'dep_tool_gradle')} is not valid.",
9292
)
9393
return CycloneDxPython(
9494
resources_path=global_config.resources_path,

src/macaron/slsa_analyzer/build_tool/poetry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2023 - 2024, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2023 - 2025, Oracle and/or its affiliates. All rights reserved.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
33

44
"""This module contains the Poetry class which inherits BaseBuildTool.
@@ -126,7 +126,7 @@ def get_dep_analyzer(self) -> DependencyAnalyzer:
126126
tool_name = "cyclonedx_py"
127127
if not DependencyAnalyzer.tool_valid(f"{tool_name}:{cyclonedx_version}"):
128128
raise DependencyAnalyzerError(
129-
f"Dependency analyzer {defaults.get('dependency.resolver','dep_tool_gradle')} is not valid.",
129+
f"Dependency analyzer {defaults.get('dependency.resolver', 'dep_tool_gradle')} is not valid.",
130130
)
131131
return CycloneDxPython(
132132
resources_path=global_config.resources_path,

0 commit comments

Comments
 (0)