fosslight-scanner 2.1.15__tar.gz → 2.1.17__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fosslight_scanner-2.1.15/src/fosslight_scanner.egg-info → fosslight_scanner-2.1.17}/PKG-INFO +1 -1
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/setup.py +1 -1
- fosslight_scanner-2.1.17/src/fosslight_scanner/_help.py +93 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17/src/fosslight_scanner.egg-info}/PKG-INFO +1 -1
- fosslight_scanner-2.1.15/src/fosslight_scanner/_help.py +0 -58
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/LICENSE +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/MANIFEST.in +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/README.md +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/requirements.txt +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/setup.cfg +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner/__init__.py +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner/_get_input.py +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner/_parse_setting.py +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner/_run_compare.py +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner/cli.py +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner/common.py +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner/fosslight_scanner.py +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner/resources/bom_compare.html +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner.egg-info/SOURCES.txt +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner.egg-info/dependency_links.txt +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner.egg-info/entry_points.txt +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner.egg-info/requires.txt +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner.egg-info/top_level.txt +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/tests/test__get_input.py +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/tests/test__help.py +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/tests/test__parse_setting.py +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/tests/test__run_compare.py +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/tests/test_cli.py +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/tests/test_common.py +0 -0
- {fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/tests/test_fosslight_scanner.py +0 -0
|
@@ -15,7 +15,7 @@ with open('requirements.txt', 'r', 'utf-8') as f:
|
|
|
15
15
|
if __name__ == "__main__":
|
|
16
16
|
setup(
|
|
17
17
|
name='fosslight_scanner',
|
|
18
|
-
version='2.1.
|
|
18
|
+
version='2.1.17',
|
|
19
19
|
package_dir={"": "src"},
|
|
20
20
|
packages=find_packages(where='src'),
|
|
21
21
|
description='FOSSLight Scanner',
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
# Copyright (c) 2021 LG Electronics Inc.
|
|
4
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
from fosslight_util.help import PrintHelpMsg
|
|
6
|
+
from fosslight_util.output_format import SUPPORT_FORMAT
|
|
7
|
+
|
|
8
|
+
_HELP_MESSAGE_SCANNER = f"""
|
|
9
|
+
📖 Usage
|
|
10
|
+
────────────────────────────────────────────────────────────────────
|
|
11
|
+
fosslight [mode] [options] <arguments>
|
|
12
|
+
|
|
13
|
+
📝 Description
|
|
14
|
+
────────────────────────────────────────────────────────────────────
|
|
15
|
+
FOSSLight Scanner performs comprehensive open source analysis by running
|
|
16
|
+
multiple modes (Source, Dependency, Binary) together. It can download
|
|
17
|
+
source code from URLs (git/wget) or analyze local paths, and generates
|
|
18
|
+
results in OSS Report format.
|
|
19
|
+
|
|
20
|
+
📚 Guide: https://fosslight.org/fosslight-guide/scanner/
|
|
21
|
+
|
|
22
|
+
🔧 Modes
|
|
23
|
+
────────────────────────────────────────────────────────────────────
|
|
24
|
+
all (default) Run all modes (Source, Dependency, Binary)
|
|
25
|
+
source Run FOSSLight Source analysis only
|
|
26
|
+
dependency Run FOSSLight Dependency analysis only
|
|
27
|
+
binary Run FOSSLight Binary analysis only
|
|
28
|
+
compare Compare two FOSSLight reports
|
|
29
|
+
|
|
30
|
+
Note: Multiple modes can be specified separated by comma
|
|
31
|
+
Example: fosslight source,binary -p /path/to/analyze
|
|
32
|
+
|
|
33
|
+
⚙️ General Options
|
|
34
|
+
────────────────────────────────────────────────────────────────────
|
|
35
|
+
-p <path> Path to analyze
|
|
36
|
+
• Compare mode: path to two FOSSLight reports (excel/yaml)
|
|
37
|
+
-w <url> URL to download and analyze (git clone or wget)
|
|
38
|
+
-f <format> Output format ({', '.join(SUPPORT_FORMAT)})
|
|
39
|
+
• Compare mode: excel, json, yaml, html
|
|
40
|
+
• Multiple formats: ex) -f excel yaml json (separated by space)
|
|
41
|
+
-e <pattern> Exclude paths from analysis (files and directories)
|
|
42
|
+
⚠️ IMPORTANT: Always wrap in quotes to avoid shell expansion
|
|
43
|
+
Example: fosslight -e "test/" "*.jar"
|
|
44
|
+
-o <path> Output directory or file name
|
|
45
|
+
-c <number> Number of processes for source analysis
|
|
46
|
+
-r Keep raw data from scanners
|
|
47
|
+
-t Hide progress bar
|
|
48
|
+
-h Show this help message
|
|
49
|
+
-v Show version information
|
|
50
|
+
-s <path> Apply settings from JSON file(check format with 'setting.json' in this repository)
|
|
51
|
+
Note: CLI flags override settings file
|
|
52
|
+
Example: -f yaml -s setting.json → output is .yaml
|
|
53
|
+
--no_correction Skip OSS information correction with sbom-info.yaml
|
|
54
|
+
--correct_fpath <path> Path to sbom-info.yaml file for correction
|
|
55
|
+
--recursive_dep Recursively analyze dependencies
|
|
56
|
+
|
|
57
|
+
🔍 Mode-Specific Options
|
|
58
|
+
────────────────────────────────────────────────────────────────────
|
|
59
|
+
For 'all' or 'binary' mode:
|
|
60
|
+
-u <db_url> Database connection string
|
|
61
|
+
Format: postgresql://username:password@host:port/database
|
|
62
|
+
|
|
63
|
+
For 'all' or 'dependency' mode:
|
|
64
|
+
-d <args> Additional arguments for dependency analysis
|
|
65
|
+
|
|
66
|
+
💡 Examples
|
|
67
|
+
────────────────────────────────────────────────────────────────────
|
|
68
|
+
# Scan current directory with all scanners
|
|
69
|
+
fosslight
|
|
70
|
+
|
|
71
|
+
# Scan specific path with exclusions
|
|
72
|
+
fosslight -p /path/to/source -e "test/" "node_modules/" "*.pyc"
|
|
73
|
+
|
|
74
|
+
# Generate output in specific format
|
|
75
|
+
fosslight -p /path/to/source -f yaml
|
|
76
|
+
|
|
77
|
+
# Run specific modes only
|
|
78
|
+
fosslight source,dependency -p /path/to/source
|
|
79
|
+
|
|
80
|
+
# Download and analyze from git repository
|
|
81
|
+
fosslight -w https://github.com/user/repo.git -o result_dir
|
|
82
|
+
|
|
83
|
+
# Compare two FOSSLight reports
|
|
84
|
+
fosslight compare -p report_v1.xlsx report_v2.xlsx -f excel
|
|
85
|
+
|
|
86
|
+
# Run with database connection for binary analysis
|
|
87
|
+
fosslight binary -p /path/to/binary -u "postgresql://user:pass@localhost:5432/sample"
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def print_help_msg():
|
|
92
|
+
helpMsg = PrintHelpMsg(_HELP_MESSAGE_SCANNER)
|
|
93
|
+
helpMsg.print_help_msg(True)
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python
|
|
2
|
-
# -*- coding: utf-8 -*-
|
|
3
|
-
# Copyright (c) 2021 LG Electronics Inc.
|
|
4
|
-
# SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
from fosslight_util.help import PrintHelpMsg
|
|
6
|
-
from fosslight_util.output_format import SUPPORT_FORMAT
|
|
7
|
-
|
|
8
|
-
_HELP_MESSAGE_SCANNER = f"""
|
|
9
|
-
FOSSLight Scanner performs open source analysis after downloading the source from URL that can be cloned by git or wget.
|
|
10
|
-
Instead, open source analysis and checking copyright/license rules can be performed for the local source path.
|
|
11
|
-
The output result is generated in OSS Report format.
|
|
12
|
-
|
|
13
|
-
Usage: fosslight [Mode] [option1] <arg1> [option2] <arg2>...
|
|
14
|
-
|
|
15
|
-
Parameters:
|
|
16
|
-
Mode: Multiple modes can be entered by separating them with , (ex. source,binary)
|
|
17
|
-
all\t\t\t Run all scanners(Default)
|
|
18
|
-
source\t\t Run FOSSLight Source Scanner
|
|
19
|
-
dependency\t\t Run FOSSLight Dependency Scanner
|
|
20
|
-
binary\t\t Run FOSSLight Binary Scanner
|
|
21
|
-
compare\t\t Compare two FOSSLight reports
|
|
22
|
-
|
|
23
|
-
Options:
|
|
24
|
-
-h\t\t\t Print help message
|
|
25
|
-
-p <path>\t\t Path to analyze (ex, -p [input_path])
|
|
26
|
-
* Compare mode input file: Two FOSSLight reports (supports excel, yaml)
|
|
27
|
-
(ex, -p [before_name].xlsx [after_name].xlsx)
|
|
28
|
-
-w <link>\t\t Link to be analyzed can be downloaded by wget or git clone
|
|
29
|
-
-f <formats> [<format> ...]\t FOSSLight Report file format ({', '.join(SUPPORT_FORMAT)})
|
|
30
|
-
* Compare mode result file: supports excel, json, yaml, html
|
|
31
|
-
* Multiple formats can be specified separated by space.
|
|
32
|
-
-e <path>\t\t Path to exclude from analysis (files and directories)
|
|
33
|
-
* IMPORTANT: Always wrap patterns in double quotes ("") to avoid shell expansion.
|
|
34
|
-
Example) fosslight -e "test/abc.py" "*.jar"
|
|
35
|
-
-o <output>\t\t Output directory or file
|
|
36
|
-
-c <number>\t\t Number of processes to analyze source
|
|
37
|
-
-r\t\t\t Keep raw data
|
|
38
|
-
-t\t\t\t Hide the progress bar
|
|
39
|
-
-v\t\t\t Print FOSSLight Scanner version
|
|
40
|
-
-s <path>\t Path to apply setting from file (check format with 'setting.json' in this repository)
|
|
41
|
-
* Direct cli flags have higher priority than setting file
|
|
42
|
-
(ex, '-f yaml -s setting.json' - result file extension is .yaml)
|
|
43
|
-
--no_correction\t Enter if you don't want to correct OSS information with sbom-info.yaml
|
|
44
|
-
* Correction mode only supported xlsx format.
|
|
45
|
-
--correct_fpath <path> Path to the sbom-info.yaml file
|
|
46
|
-
--ui\t\t Generate UI mode result file
|
|
47
|
-
--recursive_dep\t Recursively analyze dependencies
|
|
48
|
-
|
|
49
|
-
Options for only 'all' or 'bin' mode
|
|
50
|
-
-u <db_url>\t\t DB Connection(format :'postgresql://username:password@host:port/database_name')
|
|
51
|
-
|
|
52
|
-
Options for only 'all' or 'dependency' mode
|
|
53
|
-
-d <dependency_arg>\t Additional arguments for running dependency analysis"""
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
def print_help_msg():
|
|
57
|
-
helpMsg = PrintHelpMsg(_HELP_MESSAGE_SCANNER)
|
|
58
|
-
helpMsg.print_help_msg(True)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner/_parse_setting.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner/fosslight_scanner.py
RENAMED
|
File without changes
|
|
File without changes
|
{fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner.egg-info/requires.txt
RENAMED
|
File without changes
|
{fosslight_scanner-2.1.15 → fosslight_scanner-2.1.17}/src/fosslight_scanner.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|