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

ci: custom check for license being Apache-2.0 #2131

Merged
merged 2 commits into from
Aug 24, 2023

Conversation

micoferdinand98
Copy link
Contributor

fixes: #1642
Signed-off-by: micoferdinand98 ferdinand.m.b.mico@accenture.com

Apache License Checker 2.0 and exceptions

image

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@micoferdinand98 Please take a look at the review comments and address each one if possible.

@micoferdinand98 micoferdinand98 changed the title fix(ci): address CVE-2018-16138 ci: custom check for license being Apache-2.0 Oct 4, 2022
micoferdinand98 added a commit to micoferdinand98/cactus that referenced this pull request Oct 5, 2022
fixes : hyperledger-cacti#2131
Signed-off-by: micoferdinand98 <ferdinand.m.b.mico@accenture.com>
@micoferdinand98 micoferdinand98 force-pushed the feat/LicenseChecker branch 2 times, most recently from b7fe50e to f7b1c55 Compare October 5, 2022 06:42
@gitguardian
Copy link

gitguardian bot commented Mar 20, 2023

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@micoferdinand98 micoferdinand98 force-pushed the feat/LicenseChecker branch 2 times, most recently from 0e5588d to 1dfa36f Compare March 28, 2023 05:28
@micoferdinand98
Copy link
Contributor Author

After running check-apache-version.ts here is an example if it has the correct Apache version (2.0)

PASSED
Testing License Checker

here is an example if we have an incorrect version
FAILED
errortest

here is an example if we dont have declared version for apache
2.0 should be a variable
undefinedTest

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

Please also rename the other two lines from cactus to cacti. I should've selected all 3 lines when I was typing my review.

"author": {
"name": "Hyperledger Cacti Contributors",
"email": "cactus@lists.hyperledger.org",
"url": "https://www.hyperledger.org/use/cactus"
},

tools/custom-checks/check-apache-version.ts Outdated Show resolved Hide resolved
@micoferdinand98 micoferdinand98 force-pushed the feat/LicenseChecker branch 3 times, most recently from 111ba52 to bf4dc02 Compare April 25, 2023 06:22
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@micoferdinand98 There are still unaddressed items, please double check.

@petermetz
Copy link
Contributor

@micoferdinand98 Are you still working on this?

@micoferdinand98
Copy link
Contributor Author

@micoferdinand98 Are you still working on this Hi Good day I have already request Re review

@petermetz petermetz self-assigned this Jul 27, 2023
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@micoferdinand98 Please rebase onto upstream main and do a once over of the code and fix the copy-paste related problems and clean up the documentation, type defintions accordingly.

tools/custom-checks/check-apache-version.ts Outdated Show resolved Hide resolved
@micoferdinand98 micoferdinand98 force-pushed the feat/LicenseChecker branch 3 times, most recently from 6c21bed to 1f9e597 Compare August 3, 2023 07:22
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@micoferdinand98 It doesn't look like https://github.com/hyperledger/cacti/pull/2131#pullrequestreview-1550489146 was addressed. Could you please double check?

Some of the package.json files that we have were either not declaring a
license at all or were using the wrong one.

Most of these are just test fixtures so it doesn't really matter, but
due diligence dictates that we fix them regardless.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
There is now a `check-pkg-licenses` custom check which ensures that
all of our package.json files are declaring a license and that it is
the one mandated by the Hyperledger Foundation (Apache-2.0).

Fixes hyperledger-cacti#1642

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

LGTM

@petermetz petermetz enabled auto-merge (rebase) August 24, 2023 19:18
@petermetz petermetz added this to the v2.0.0-alpha.2 milestone Aug 24, 2023
@petermetz petermetz merged commit a6a4b7c into hyperledger-cacti:main Aug 24, 2023
119 of 129 checks passed
@petermetz petermetz deleted the feat/LicenseChecker branch August 24, 2023 20:05
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.

ci: custom check for license being Apache-2.0
4 participants