Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3eb99d6
chore:SP-2960 Refactor inspect module
agustingroh Jul 28, 2025
8e5a3e7
feat:SP-2961 Implements dependency track inspect task
agustingroh Jul 28, 2025
e0738dc
chore:SP-2967 Adds source(raw, dependency-track) to inspect subcommand
agustingroh Jul 29, 2025
6729382
chore:SP-2968 Organizes inspection module by data sources
agustingroh Jul 29, 2025
e42349e
chore: Refactor policy check responses
agustingroh Jul 29, 2025
ff6c435
chore:SP-2965 Adds documentation on project_violation.py file
agustingroh Jul 29, 2025
b806630
chore:SP-2970 Adds dependency track project violations inspection uni…
agustingroh Jul 29, 2025
a96e735
chore:SP-2969 Adds backward compatibility for the legacy inspect command
agustingroh Jul 29, 2025
38fd534
chore:SP-2971 Updates CLIENT_HELP.md file
agustingroh Jul 29, 2025
b1b9054
chore:SP-2973 Updates CHANGELOG.md file
agustingroh Jul 29, 2025
0829ed1
chore:SP-2972 Upgrades version to v1.31.0
agustingroh Jul 29, 2025
2aa2d21
chore:SP-2974 Fixes linter issues on inspect module
agustingroh Jul 29, 2025
3360da6
chore: Fixes Dockerfile
agustingroh Jul 29, 2025
76af65d
chore:SP-2981 Implements dependency track service
agustingroh Jul 31, 2025
e40e440
chore:SP-2980 Adds new parameters to get dependency track project vio…
agustingroh Jul 31, 2025
b254e14
chore: Fixes linter issues
agustingroh Jul 31, 2025
5545985
chore:SP-2983 Improves error handling on dependency track project_vio…
agustingroh Jul 31, 2025
42b9e7d
chore:SP-2984 Gets project status processing by project id and upload…
agustingroh Jul 31, 2025
3627a68
chore:SP-2994 Adds timeout parameter and enhance error handling for i…
agustingroh Aug 1, 2025
a0fa832
Inspect command argument optimisation
Alex-1089 Aug 6, 2025
cffcbf1
Updated PolicyCheck return codes and simplified duplicate code
Alex-1089 Aug 6, 2025
3d6a5ec
Updated PolicyCheck return codes and simplified duplicate code
Alex-1089 Aug 6, 2025
6981eb4
Updated to pass tests
Alex-1089 Aug 6, 2025
a821c57
Updated to pass tests
Alex-1089 Aug 6, 2025
475b87c
Fixed linter issues
Alex-1089 Aug 6, 2025
ae6816d
Refactor dt export command options
Alex-1089 Aug 7, 2025
7e14f1a
Removed redundant data response
Alex-1089 Aug 7, 2025
c71a5d0
Increased max-args for linter
Alex-1089 Aug 7, 2025
711c410
Simplified bom upload function
Alex-1089 Aug 7, 2025
deaec82
Fix for init only
Alex-1089 Aug 7, 2025
2b0fa80
Fixed bug SP-2985
Alex-1089 Aug 8, 2025
d50e495
simplify success check
eeisegn Aug 8, 2025
24f99e3
Updated Changelog details
Alex-1089 Aug 8, 2025
ccba193
Expanding success response code check
Alex-1089 Aug 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Upcoming changes...

## [1.31.0] - 2025-08-08
### Added
- Add `inspect dependency-track project-violations` subcommand to retrieve Dependency Track project violations in Markdown and JSON formats
### Changed
- Renamed `inspect copyleft` to `inspect raw copyleft`
- Renamed `inspect undeclared` to `inspect raw undeclared`
- Renamed `inspect component-summary` to `inspect raw component-summary`
- Renamed `inspect license-summary` to `inspect raw license-summary`
- Updated Policy return codes. 0 → Success, 2 → Fail, 1 → Error
### Fixed
- Fixed incorrect folder filtering configurations for fingerprinting and scanning

## [1.30.0] - 2025-07-22
### Added
- Add `export dt` subcommand to export SBOM files to Dependency Track
Expand Down Expand Up @@ -615,5 +627,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[1.28.2]: https://github.com/scanoss/scanoss.py/compare/v1.28.1...v1.28.2
[1.29.0]: https://github.com/scanoss/scanoss.py/compare/v1.28.2...v1.29.0
[1.30.0]: https://github.com/scanoss/scanoss.py/compare/v1.29.0...v1.30.0

[1.31.0]: https://github.com/scanoss/scanoss.py/compare/v1.30.0...v1.31.0

18 changes: 17 additions & 1 deletion CLIENT_HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,11 @@ The `inspect` command has a suite of sub-commands designed to inspect the result
Details, such as license compliance or component declarations, can be examined.

For example:
* Copyleft (`copylefet`)
* Copyleft (`copyleft`)
* Undeclared Components (`undeclared`)
* License Summary (`license-summary`)
* Component Summary (`component-summary`)
* Dependency Track project violations (`dependency-track project-violations`)

For the latest list of sub-commands, please run:
```bash
Expand Down Expand Up @@ -476,6 +477,21 @@ Example with an output file:
scanoss-py insp component-summary -i scan-results.json --output component-summary.json
```

#### Inspect Dependency Track project violations Markdown output
The following command can be used to retrieve project violations from Dependency Track in Markdown format.

**Note:** The upload token is optional. It is used to check the project processing status. If no token is provided, the latest project violations will be retrieved without waiting for project processing to complete.

Example with project id:
```bash
scanoss-py inspect dt project-violations --dt-upload-token <dt-upload-token> --dt-url <dependency-track-url> --dt-projectid <dependency-track-project-id> --dt-apikey <dependency-track-api-key> --format md --output project-violations.md
```
Example with project name and version:
```bash
scanoss-py inspect dt project-violations --dt-upload-token <dt-upload-token> --dt-url <dependency-track-url> --dt-projectname <dependency-track-project-name> --dt-projectversion <dependency-track-project-version> --dt-apikey <dependency-track-api-key> --format md --output project-violations.md
```


### Folder-Scan a Project Folder

The new `folder-scan` subcommand performs a comprehensive scan on an entire directory by recursively processing files to generate folder-level fingerprints. It computes CRC64 hashes and simhash values to detect directory-level similarities, which is especially useful for comparing large code bases or detecting duplicate folder structures.
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ FROM base AS builder

# Setup the required build tooling
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential gcc \
&& apt-get install -y --no-install-recommends build-essential gcc libicu-dev pkg-config \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Expand Down Expand Up @@ -54,9 +54,9 @@ COPY --from=builder /opt/venv /opt/venv
ENV PATH=/opt/venv/bin:$PATH
ENV GRPC_POLL_STRATEGY=poll

# Install jq and curl commands
# Install jq and curl commands and ICU runtime library
RUN apt-get update \
&& apt-get install -y --no-install-recommends jq curl \
&& apt-get install -y --no-install-recommends jq curl libicu72 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Calculates hashes for a directory or file and shows them on the STDOUT.
- Fingerprint all hidden files/folders

-----------------------------------------
Detect dependecies: dependencies, dp, dep
Detect dependencies: dependencies, dp, dep
-----------------------------------------

Scan source code for dependencies, but do not decorate them.
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[tool.ruff]
# Enable pycodestyle (E), pyflakes (F), isort (I), pylint (PL)
select = ["E", "F", "I", "PL"]
lint.select = ["E", "F", "I", "PL"]
line-length = 120
# Assume Python 3.9+
target-version = "py39"
Expand All @@ -22,3 +22,6 @@ line-ending = "auto"

[tool.ruff.lint.isort]
known-first-party = ["scanoss"]

[tool.ruff.lint.pylint]
max-args = 5
Empty file added src/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion src/scanoss/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
THE SOFTWARE.
"""

__version__ = '1.30.0'
__version__ = '1.31.0'
Loading