Skip to content

Commit 65afdaf

Browse files
authored
Merge pull request #117 from scanoss/feature/mdaloia/SP-2400-SCANOSS-PY-Create-crypto-sub-command
feat: [SP-2400] - Create crypto sub command
2 parents 5ad4793 + e65f396 commit 65afdaf

File tree

8 files changed

+654
-71
lines changed

8 files changed

+654
-71
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Added
1010
- Upcoming changes...
1111

12+
## [1.24.0] - 2025-05-28
13+
### Added
14+
- Add `crypto` subcommand to retrieve cryptographic algorithms for the given components
15+
- Add `crypto hints` subcommand to retrieve cryptographic hints for the given components
16+
- Add `crypto versions-in-range` subcommand to retrieve cryptographic versions in range for the given components
17+
1218
## [1.23.0] - 2025-04-24
1319
### Added
1420
- Add `--origin` flag to `component provenance` subcommand to retrieve provenance using contributors origin
@@ -515,4 +521,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
515521
[1.20.6]: https://github.com/scanoss/scanoss.py/compare/v1.20.5...v1.20.6
516522
[1.21.0]: https://github.com/scanoss/scanoss.py/compare/v1.20.6...v1.21.0
517523
[1.22.0]: https://github.com/scanoss/scanoss.py/compare/v1.21.0...v1.22.0
518-
[1.23.0]: https://github.com/scanoss/scanoss.py/compare/v1.22.0...v1.23.0
524+
[1.23.0]: https://github.com/scanoss/scanoss.py/compare/v1.22.0...v1.23.0
525+
[1.24.0]: https://github.com/scanoss/scanoss.py/compare/v1.23.0...v1.24.0

docs/source/index.rst

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,91 @@ Scans Docker container images for dependencies, extracting and analyzing compone
336336
* - --ca-cert <file>
337337
- Alternative certificate PEM file
338338

339+
-----------------
340+
Crypto: crypto, cr
341+
-----------------
342+
343+
Provides subcommands to retrieve cryptographic information for components.
344+
345+
.. code-block:: bash
346+
347+
scanoss-py crypto <subcommand>
348+
349+
Subcommands:
350+
~~~~~~~~~~~~
351+
352+
**algorithms (alg)**
353+
Retrieve cryptographic algorithms for the given components.
354+
355+
.. code-block:: bash
356+
357+
scanoss-py crypto algorithms --purl <purl_string>
358+
359+
.. list-table::
360+
:widths: 20 30
361+
:header-rows: 1
362+
363+
* - Argument
364+
- Description
365+
* - --with-range
366+
- Returns the list of versions in the specified range that contains cryptographic algorithms. (Replaces the previous --range option)
367+
368+
**hints**
369+
Retrieve encryption hints for the given components.
370+
371+
.. code-block:: bash
372+
373+
scanoss-py crypto hints --purl <purl_string>
374+
375+
.. list-table::
376+
:widths: 20 30
377+
:header-rows: 1
378+
379+
* - Argument
380+
- Description
381+
* - --with-range
382+
- Returns the list of versions in the specified range that contains encryption hints.
383+
384+
**versions-in-range (vr)**
385+
Given a list of PURLs and version ranges, get a list of versions that do/don't contain crypto algorithms.
386+
387+
.. code-block:: bash
388+
389+
scanoss-py crypto versions-in-range --purl <purl_string_with_range>
390+
391+
Common Crypto Arguments:
392+
~~~~~~~~~~~~~~~~~~~~~~~~
393+
The following arguments are common to the ``algorithms``, ``hints``, and ``versions-in-range`` subcommands:
394+
395+
.. list-table::
396+
:widths: 20 30
397+
:header-rows: 1
398+
399+
* - Argument
400+
- Description
401+
* - --purl <PURL>, -p <PURL>
402+
- Package URL (PURL) to process. Can be specified multiple times.
403+
* - --input <file>, -i <file>
404+
- Input file name containing PURLs.
405+
* - --output <file name>, -o <file name>
406+
- Output result file name (optional - default STDOUT).
407+
* - --timeout <seconds>, -M <seconds>
408+
- Timeout (in seconds) for API communication (optional - default 600).
409+
* - --key <KEY>, -k <KEY>
410+
- SCANOSS API Key token (optional - not required for default OSSKB URL).
411+
* - --api2url <API2URL>
412+
- SCANOSS gRPC API 2.0 URL (optional - default: https://api.osskb.org).
413+
* - --grpc-proxy <GRPC_PROXY>
414+
- GRPC Proxy URL to use for connections.
415+
* - --ca-cert <CA_CERT>
416+
- Alternative certificate PEM file.
417+
* - --debug, -d
418+
- Enable debug messages.
419+
* - --trace, -t
420+
- Enable trace messages, including API posts.
421+
* - --quiet, -q
422+
- Enable quiet mode.
423+
339424
-----------------
340425
Component:
341426
-----------------

src/scanoss/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
THE SOFTWARE.
2323
"""
2424

25-
__version__ = '1.23.0'
25+
__version__ = '1.24.0'

0 commit comments

Comments
 (0)