Detection Process¶
- File location:
Bundled implementation:
source/client/python/scan.py
Cluster implementation:
cluster/app/source/python/scan.py
cluster/app/source/python/utils/py
Bundled Implementation¶
- scan.process(entry: Entry)¶
- Availability:
bundled implementation
Process extracted files with detection APIs.
- Parameters:
entry (Entry) – File to be processed.
- scan.make_env(api: API)¶
- Availability:
bundled implementation
Generate a dictionary of environment variables based on API entry.
- scan.make_cwd(api: API, entry: Entry | None = None, example: bool = False)¶
- Availability:
bundled implementation
Generate the working directory of API entry.
- scan.init(api: API, cwd: str, env: Dict[str, Any], mime: str, uuid: str)¶
- Availability:
bundled implementation
Run the initialisation commands of API entry.
- Parameters:
- Returns:
Exit code (
const.EXIT_SUCCESS
orconst.EXIT_FAILURE
).- Return type:
- scan.run(command: str | List[str], cwd: str = None, env: Dict[str, Any] | None = None, mime: str = 'example', file: str = 'unknown')¶
- Availability:
bundled implementation
Run command with provided settings.
- Parameters:
- Returns:
Exit code (
const.EXIT_SUCCESS
orconst.EXIT_FAILURE
).- Return type:
- scan.issue(mime: str)¶
- Availability:
bundled implementation
Called when the execution of API commands failed.
- Parameters:
mime (str) – MIME type.
- Returns:
Exit code (
const.EXIT_FAILURE
).- Return type:
- Raises:
APIError – If
mime
isexample
.APIWarning – If
mime
is NOTexample
.
- exception scan.APIWarning¶
- Bases:
Warning
- Availability:
bundled implementation
Warn if API execution failed.
- exception scan.APIError¶
- Bases:
Exception
- Availability:
bundled implementation
Error if API execution failed.
Cluster Implementation¶
- process.make_cwd(api: API, entry: Entry | None = None, example: bool = False)¶
- Availability:
cluster implementation
See also
- process.init(api: API, cwd: str, env: Dict[str, Any], mime: str, uuid: str)¶
- Availability:
cluster implementation
See also
- process.run(command: str | List[str], cwd: str = None, env: Dict[str, Any] | None = None, mime: str = 'example', file: str = 'unknown')¶
- Availability:
cluster implementation
See also
- exception utils.APIWarning¶
- Bases:
Warning
- Availability:
cluster implementation
See also
- exception utils.APIError¶
- Bases:
Exception
- Availability:
cluster implementation
See also