diff --git a/.gitignore b/.gitignore index 7442f22..0433d1f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -# Artefact +# Artifact build/ .cache/ site/ diff --git a/codesectools/datasets/core/dataset.py b/codesectools/datasets/core/dataset.py index c4f047a..2d83eb5 100644 --- a/codesectools/datasets/core/dataset.py +++ b/codesectools/datasets/core/dataset.py @@ -185,7 +185,7 @@ def is_built(self) -> bool: return True def list_prebuilt_files(self) -> list[Path]: - """List the pre-built artefact files.""" + """List the pre-built artifact files.""" prebuilt_dir, prebuilt_glob = self.prebuilt_expected prebuilt_path = USER_CACHE_DIR / self.name / prebuilt_dir return list(prebuilt_path.glob(prebuilt_glob)) diff --git a/codesectools/sasts/all/cli.py b/codesectools/sasts/all/cli.py index d3264f6..5282736 100644 --- a/codesectools/sasts/all/cli.py +++ b/codesectools/sasts/all/cli.py @@ -94,12 +94,12 @@ def analyze( for sast in all_sast.sasts_by_lang.get(lang, []): if isinstance(sast, PrebuiltBuildlessSAST) and artifacts is None: print( - f"[i]{sast.name} can use pre-built artifacts ({sast.artefact_name} {sast.artefact_type}) for more accurate analysis" + f"[i]{sast.name} can use pre-built artifacts ({sast.artifact_name} {sast.artifact_type}) for more accurate analysis" ) print("[i]Use the flag --artifacts to provide the artifacts") elif isinstance(sast, PrebuiltSAST) and artifacts is None: print( - f"[b]Skipping {sast.name} because it requires pre-built artifacts ({sast.artefact_name} {sast.artefact_type})" + f"[b]Skipping {sast.name} because it requires pre-built artifacts ({sast.artifact_name} {sast.artifact_type})" ) print("[b]Use the flag --artifacts to provide the artifacts") continue diff --git a/codesectools/sasts/core/cli.py b/codesectools/sasts/core/cli.py index 4195df9..41baf60 100644 --- a/codesectools/sasts/core/cli.py +++ b/codesectools/sasts/core/cli.py @@ -137,12 +137,12 @@ def add_analyze(self: Self, help: str = "") -> None: if isinstance(self.sast, PrebuiltBuildlessSAST): artifacts_default = typer.Option( default=None, - help=f"Pre-built artifacts ({self.sast.artefact_name} {self.sast.artefact_type}) for more accurate analysis", + help=f"Pre-built artifacts ({self.sast.artifact_name} {self.sast.artifact_type}) for more accurate analysis", metavar="ARTIFACTS", ) elif isinstance(self.sast, PrebuiltSAST): artifacts_default = typer.Option( - help=f"Pre-built artifacts ({self.sast.artefact_name} {self.sast.artefact_type})", + help=f"Pre-built artifacts ({self.sast.artifact_name} {self.sast.artifact_type})", metavar="ARTIFACTS", ) else: @@ -184,7 +184,7 @@ def analyze( """ if isinstance(self.sast, PrebuiltBuildlessSAST) and artifacts is None: print( - f"[i]{self.sast.name} can use pre-built artifacts ({self.sast.artefact_name} {self.sast.artefact_type}) for more accurate analysis" + f"[i]{self.sast.name} can use pre-built artifacts ({self.sast.artifact_name} {self.sast.artifact_type}) for more accurate analysis" ) print("[i]Use the flag --artifacts to provide the artifacts") diff --git a/codesectools/sasts/core/sast/__init__.py b/codesectools/sasts/core/sast/__init__.py index 72b20d9..acd82c2 100644 --- a/codesectools/sasts/core/sast/__init__.py +++ b/codesectools/sasts/core/sast/__init__.py @@ -332,13 +332,13 @@ class PrebuiltSAST(SAST): """Represent a SAST tool that requires pre-built artifacts for analysis. Attributes: - artefact_name (str): The name of the expected artifact (e.g., 'Java Bytecode'). - artefact_type (Literal["file", "directory"]): The type of artifact expected. + artifact_name (str): The name of the expected artifact (e.g., 'Java Bytecode'). + artifact_type (Literal["file", "directory"]): The type of artifact expected. """ - artefact_name: str - artefact_type: Literal["file", "directory"] + artifact_name: str + artifact_type: Literal["file", "directory"] def analyze_files( self, diff --git a/codesectools/sasts/tools/Cppcheck/sast.py b/codesectools/sasts/tools/Cppcheck/sast.py index 485ac94..600fab0 100644 --- a/codesectools/sasts/tools/Cppcheck/sast.py +++ b/codesectools/sasts/tools/Cppcheck/sast.py @@ -67,5 +67,5 @@ class CppcheckSAST(PrebuiltBuildlessSAST): } # PrebuiltSAST - artefact_name = "Compilation database" - artefact_type = "file" + artifact_name = "Compilation database" + artifact_type = "file" diff --git a/codesectools/sasts/tools/SpotBugs/sast.py b/codesectools/sasts/tools/SpotBugs/sast.py index 19fd70c..6d116dd 100644 --- a/codesectools/sasts/tools/SpotBugs/sast.py +++ b/codesectools/sasts/tools/SpotBugs/sast.py @@ -78,5 +78,5 @@ class SpotBugsSAST(PrebuiltSAST): } # PrebuiltSAST - artefact_name = "Java Bytecode" - artefact_type = "directory" + artifact_name = "Java Bytecode" + artifact_type = "directory" diff --git a/docs/home/quick_start_guide.md b/docs/home/quick_start_guide.md index 1548a4c..c5d9a21 100644 --- a/docs/home/quick_start_guide.md +++ b/docs/home/quick_start_guide.md @@ -209,7 +209,7 @@ cstools spotbugs benchmark BenchmarkJava_java │ Build command: mvn clean compile │ │ Full command: (cd │ │ /home/michel/.codesectools/cache/BenchmarkJava && mvn clean compile) │ -│ Expected arteficts: │ +│ Expected artifacts: │ │ /home/michel/.codesectools/cache/BenchmarkJava/target/classes/org/owasp │ │ /benchmark/testcode/*.class │ ╰─────────────────────────────────────────────────────────────────────────╯ diff --git a/docs/sast/index.md b/docs/sast/index.md index d217457..1a14d15 100644 --- a/docs/sast/index.md +++ b/docs/sast/index.md @@ -45,8 +45,8 @@ classDiagram } class PrebuiltBuildlessSAST { - +artefact_name: str - +artefact_type: str + +artifact_name: str + +artifact_type: str } SAST <|-- BuildlessSAST