-
Notifications
You must be signed in to change notification settings - Fork 24
[SP-2874] feat: add licenses sub-command, add support for ingesting CDX, add CDX input validation #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
matiasdaloia
wants to merge
18
commits into
main
Choose a base branch
from
feature/mdaloia/SP-2874-Add-support-for-ingesting-CDX-to-all-scanoss-py-decoration-comamnds
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[SP-2874] feat: add licenses sub-command, add support for ingesting CDX, add CDX input validation #131
Changes from 16 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
592e714
[SP-2874] feat: add licenses sub-command, add support for ingesting C…
matiasdaloia 72b0652
[SP-2874] feat: support CDX input file in crypto decoration commands
matiasdaloia 0b60f5d
[SP-2874] chore: update dependency versions, refactor to reduce metho…
matiasdaloia df62002
[SP-2874] chore: use python 3.9 in all workflows
matiasdaloia 9bdc2af
[SP-2874] chore: update protobuf
matiasdaloia 43e68bb
[SP-2874] chore: update all remaining protobufs
matiasdaloia bffcc06
[SP-2874] chore: bump version
matiasdaloia cb6476d
[SP-2874] chore: update changelog, documentation and dockerfile
matiasdaloia 2e28522
[SP-2874] chore: update scanoss.json
matiasdaloia 0a3ebe3
[SP-2874] chore: update scanoss.json
matiasdaloia b84b036
[SP-2874] chore: update changelog and version
matiasdaloia 5f920dc
[SP-2991] fix: update to papi latest definitions
matiasdaloia 96f839e
[SP-2874] chore: update version and changelog
matiasdaloia 70f73c6
[SP-2874] fix: adapt for new components request
matiasdaloia b2c6409
[SP-2874] feat: add REST support for licenses endpoint
matiasdaloia 5777a49
[SP-2874] chore: update workflow python version
matiasdaloia a490fc3
[SP-2874] fix: scancode dockerfile execution
matiasdaloia 62f6076
[SP-2874] chore: update pkg requirements
matiasdaloia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
""" | ||
@generated by mypy-protobuf. Do not edit manually! | ||
isort:skip_file | ||
""" | ||
|
||
import builtins | ||
import google.protobuf.descriptor | ||
import google.protobuf.descriptor_pb2 | ||
import google.protobuf.internal.extension_dict | ||
import protoc_gen_swagger.options.openapiv2_pb2 | ||
|
||
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor | ||
|
||
OPENAPIV2_SWAGGER_FIELD_NUMBER: builtins.int | ||
OPENAPIV2_OPERATION_FIELD_NUMBER: builtins.int | ||
OPENAPIV2_SCHEMA_FIELD_NUMBER: builtins.int | ||
OPENAPIV2_TAG_FIELD_NUMBER: builtins.int | ||
OPENAPIV2_FIELD_FIELD_NUMBER: builtins.int | ||
openapiv2_swagger: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.FileOptions, protoc_gen_swagger.options.openapiv2_pb2.Swagger] | ||
"""ID assigned by [email protected] for grpc-gateway project. | ||
|
||
All IDs are the same, as assigned. It is okay that they are the same, as they extend | ||
different descriptor messages. | ||
""" | ||
openapiv2_operation: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.MethodOptions, protoc_gen_swagger.options.openapiv2_pb2.Operation] | ||
"""ID assigned by [email protected] for grpc-gateway project. | ||
|
||
All IDs are the same, as assigned. It is okay that they are the same, as they extend | ||
different descriptor messages. | ||
""" | ||
openapiv2_schema: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.MessageOptions, protoc_gen_swagger.options.openapiv2_pb2.Schema] | ||
"""ID assigned by [email protected] for grpc-gateway project. | ||
|
||
All IDs are the same, as assigned. It is okay that they are the same, as they extend | ||
different descriptor messages. | ||
""" | ||
openapiv2_tag: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.ServiceOptions, protoc_gen_swagger.options.openapiv2_pb2.Tag] | ||
"""ID assigned by [email protected] for grpc-gateway project. | ||
|
||
All IDs are the same, as assigned. It is okay that they are the same, as they extend | ||
different descriptor messages. | ||
""" | ||
openapiv2_field: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.FieldOptions, protoc_gen_swagger.options.openapiv2_pb2.JSONSchema] | ||
"""ID assigned by [email protected] for grpc-gateway project. | ||
|
||
All IDs are the same, as assigned. It is okay that they are the same, as they extend | ||
different descriptor messages. | ||
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,24 @@ | ||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! | ||
"""Client and server classes corresponding to protobuf-defined services.""" | ||
import grpc | ||
import warnings | ||
|
||
|
||
GRPC_GENERATED_VERSION = '1.73.1' | ||
GRPC_VERSION = grpc.__version__ | ||
_version_not_supported = False | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
try: | ||
from grpc._utilities import first_version_is_lower | ||
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) | ||
except ImportError: | ||
_version_not_supported = True | ||
|
||
if _version_not_supported: | ||
raise RuntimeError( | ||
f'The grpc package installed is at version {GRPC_VERSION},' | ||
+ f' but the generated code in protoc_gen_swagger/options/annotations_pb2_grpc.py depends on' | ||
+ f' grpcio>={GRPC_GENERATED_VERSION}.' | ||
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' | ||
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' | ||
) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
🧩 Analysis chain
Duplicate dependency and likely wrong package variant for OpenAPI v2 protos.
protoc-gen-openapiv2
is listed twice (Lines 34 and 43).protoc-gen-openapiv2
package on PyPI appears unmaintained (last release 0.0.1 on Dec 2, 2022). A more up-to-date alternative isgrpc-gateway-protoc-openapiv2
(e.g., 2.25.1.0 released Jan 11, 2025). Please align the dependency with whatever import path your generated code uses and deduplicate. (pypi.org)Suggested fix (choose the package that matches your generated imports; if you import
grpc_gateway_protoc_openapiv2.*
, use the first option below):If your generated imports are
protoc_gen_openapiv2.*
, keep that variant but remove the duplicate and consider switching to a maintained fork when feasible. The upstream gRPC‑Gateway docs also indicate the plugin is a Go tool (protoc-gen-openapiv2
), hence the need for Python-packaged stubs. (github.com)Run to confirm which package your code imports:
Also applies to: 43-43
🏁 Script executed:
Length of output: 5380
Remove duplicate dependency; keep protoc-gen-openapiv2 to match generated imports
Generated protos import protoc_gen_openapiv2.options — remove the duplicate protoc-gen-openapiv2 entry from setup.cfg.
🤖 Prompt for AI Agents