Skip to content
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

Validate licenses included in artifacts #558

Closed
wants to merge 1 commit into from

Conversation

bchuo
Copy link
Contributor

@bchuo bchuo commented Mar 7, 2025

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #547

Special notes for your reviewer:

Unverified

The committer email address is not verified.
@@ -538,6 +538,10 @@ func (s Spec) Validate() error {
}
}

if s.Artifacts.Licenses == nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we want to check if source includes LICENSE or LICENSE.md

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I gathered on build-defs, I don't see where a license is included explicitly. Do you mean searching through the aforementioned source to verify the path is correct?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can really do this validation here.
At best we can provide a warning message back to clients, but we can't do that from here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's prohibiting us from doing that validation? Is it that we don't have visibility to the file system at this point?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess in the same vein, what exactly constitutes a license and do we require it for every spec/does it exist for every project

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think dalec itself is just not the right place to error out on a missing license file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like we should add this check to build-defs then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think so.

@cpuguy83 cpuguy83 closed this Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REQ] validate licenses are copied if a licence is specified in the source
3 participants