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

Add/licensing action #122

Closed
wants to merge 11 commits into from
Closed

Add/licensing action #122

wants to merge 11 commits into from

Conversation

jeffpaul
Copy link
Member

Description of the Change

Uses https://github.com/marketplace/actions/ghascompliance as a GitHub Action to scan all commits and PRs to trunk and develop (admitting we might want to dial some of this back after further testing) to check that any dependent code is licensed as GPL-compatible.

Alternate Designs

Cross our fingers and hope that we will catch invalid licensed dependencies on our own

Possible Drawbacks

Until we fine-tune this action, we may get a lot of false positives (but hopefully after some testing this will be relatively quiet until something non-GPL-compatible is mistakenly added in a PR).

Verification Process

Reviewed docs for the GH Action, will see how it performs once this PR is opened and we can view the results of its check.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Changelog Entry

Added - Scanning of dependencies to ensure they are GPL-compatible.

Credits

Props @jeffpaul, @vikrampm1.

jeffpaul and others added 2 commits April 14, 2022 09:27
Co-Authored-By: Vikram  <93216400+vikrampm1@users.noreply.github.com>
Co-Authored-By: Vikram  <93216400+vikrampm1@users.noreply.github.com>
@jeffpaul jeffpaul added this to the 1.1.0 milestone Apr 14, 2022
@jeffpaul jeffpaul requested a review from dkotter April 14, 2022 14:37
@jeffpaul jeffpaul self-assigned this Apr 14, 2022
I hope

Co-Authored-By: Vikram  <93216400+vikrampm1@users.noreply.github.com>
@jeffpaul jeffpaul removed the request for review from dkotter April 14, 2022 14:54
@jeffpaul
Copy link
Member Author

Going to research this a bit more with @vikrampm1 to see what else is needed to get this action working (or alternatively find a different action to help scan dependency licensing).

@jeffpaul jeffpaul added the needs:refresh This requires a refreshed PR to resolve. label Apr 14, 2022
@jeffpaul jeffpaul marked this pull request as draft June 6, 2022 17:46
jeffpaul added a commit to 10up/.github that referenced this pull request Jun 13, 2022
Testing repo licensing action in 10up/insert-special-characters#122
@jeffpaul
Copy link
Member Author

Still not able to get this to work, so going to try one other tool but leaving note that if we close this PR that we'll want to revert 10up/.github#20 as no longer needed.

@jeffpaul jeffpaul mentioned this pull request Jun 13, 2022
6 tasks
@dkotter dkotter modified the milestones: 1.0.5, 1.1.0 Jun 24, 2022
# The owner/repo of where the policy is stored
policy: 10up/.github
# The local (within the workspace) or repository
policy-path: blob/trunk/policy.yml

Choose a reason for hiding this comment

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

@jeffpaul This policy path, is there sub folders called "blob/truck"? The tool does not need this and is relative to the base path in the repo.

Example:

- name: Advance Security Compliance Action
  uses: GeekMasher/advanced-security-compliance@v1.6.1
  with:
    # The owner/repo of where the policy is stored  
    policy: GeekMasher/security-queries
    # The local (within the workspace) or repository
    policy-path: policies/default.yml
    # The branch you want to target
    policy-branch: main

Points to this file https://github.com/GeekMasher/security-queries/blob/main/policies/default.yml

@@ -0,0 +1,34 @@
name: Default Policy

Choose a reason for hiding this comment

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

This is a policy as code file. Not a GitHub Actions workflow file. You might need to place this in a different dir or use the policy in your 10up/.github repo

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved up a directory level in 6cc130a

@jeffpaul
Copy link
Member Author

Leaving a note here before I head off on vacation that the tweaks I made (thanks for the tips @GeekMasher!) appear to have gotten this action working smoothly, but I think we'll want to remove the policy file from this repo and leverage the one in the 10up/.github repo (since we'll want to run this action across all our projects using the same policy). As such, I'd like us to look at enhancing that policy to match the research I did in listing out the allow or disallow lists in https://github.com/10up/insert-special-characters/pull/157/files for GPL-compatible/-incompatible licenses.

@jeffpaul jeffpaul marked this pull request as ready for review September 28, 2022 17:29
@jeffpaul
Copy link
Member Author

Note we'll want to select either this PR approach or that in #157, but not both.

@jeffpaul
Copy link
Member Author

jeffpaul commented Oct 4, 2022

Closing in favor of #157 as it includes a nice action summary and is a verified action creator on GitHub (though otherwise the action stats are similar).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:refresh This requires a refreshed PR to resolve.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants