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

Address errors raised by OpenSSF's Scorecard #55748

Closed
wants to merge 0 commits into from

Conversation

gregorywaynepower
Copy link
Contributor

@gregorywaynepower gregorywaynepower commented Jan 2, 2024

Description

Endeavoring to make this repository score better on the OpenSSF's Scorecard metrics and make security less of a pain. The reason I'm submitting is due to the results I got from the OpenSSF's Scorecard CLI Tool--the writeup is attached to #55733. I can see what I can do to test and update these dependencies. From the conversation I've had with maintainers so far that some of these are centered around the qgis server landing page.

If the above are false positives, I can go ahead with making a osv-scanner.toml as listed so y'all aren't peppered with never-ending alerts if these issues have been addressed. If y'all want more information on OSV-Scanner, which is what is used under the hood you can look to the Google's Website for OSV-Scanner or GitHub Repo.

@gregorywaynepower gregorywaynepower marked this pull request as draft January 2, 2024 16:36
@github-actions github-actions bot added this to the 3.36.0 milestone Jan 2, 2024
@elpaso
Copy link
Contributor

elpaso commented Jan 2, 2024

About the NPM issues, they are all false positives related to the use of javascript as a backend language, we are using javascript to build a frontend web application based on vue js.

@elpaso
Copy link
Contributor

elpaso commented Jan 2, 2024

About the NPM issues, they are all false positives related to the use of javascript as a backend language, we are using javascript to build a frontend web application based on vue js.

... forgot to mention that the JS application is not built nor shipped anymore, see: #55462 if not action is taken by the package maintainers I will probably remove the landing page functionality altogether.

@gregorywaynepower
Copy link
Contributor Author

gregorywaynepower commented Jan 2, 2024

About the NPM issues, they are all false positives related to the use of javascript as a backend language, we are using javascript to build a frontend web application based on vue js.

... forgot to mention that the JS application is not built nor shipped anymore, see: #55462 if not action is taken by the package maintainers I will probably remove the landing page functionality altogether.

I appreciate the context! This doesn't relate to QGIS-Server, right? Is this related to just the Catalog feature? Apologies, I'm not terribly familiar with this side of the project.

@haubourg
Copy link
Member

haubourg commented Jan 2, 2024

I appreciate the context! This doesn't relate to QGIS-Server, right? Is this related to just the Catalog feature? Apologies, I'm not terribly familiar with this side of the project.

The server landing page is part of the OGC API new specifications, so yes, it belongs to QGIS server. See http://opengeospatial.github.io/e-learning/ogcapi-features/text/operations.html#landing-page

Thanks a lot for your PR , it will be excellent to have scanner results in PR's artifacts.

@gregorywaynepower
Copy link
Contributor Author

gregorywaynepower commented Jan 2, 2024

@elpaso So were you planning on axing QGIS Server in its entirety or just the Catalog feature?

@haubourg I appreciate you all being open towards the PR, usually folks bristle at the thought of dealing with security patches and the added work it entails.

We do have a two options available for implementing the Scorecard.

  1. GitHub Action - lets you add multiple tokens and appears to be easier to configure (this is what I've implemented in my fork)
  2. GitHub App Installation - has higher rate-limit quotas (not sure what limits the GitHub Action has vs GitHub App), lets you add multiple tokens, is a bit more involved.

@gregorywaynepower
Copy link
Contributor Author

gregorywaynepower commented Jan 2, 2024

I've added the OpenSSF Best Practices Badge as well.

@NathanW2 By the looks of it I have reason to believe that this repo would get a much higher score than what the audit 2018 and I'd be more than willing to do the audit if you give me the ability to update your prior audit.

@gregorywaynepower gregorywaynepower marked this pull request as ready for review January 2, 2024 22:27
@gregorywaynepower
Copy link
Contributor Author

@elpaso All right, feel free to review the reasons listed under my most recent commit. Feel free provide additional context as to why these are being ignored if my paraphrasing of your statement and reference to this PR isn't enough.

You score 10/10 for the Vulnerabilities check because of these changes, along with adding the OpenSSF Scorecard and the OpenSSF Best Practices badge has been added to the README.md.

@gregorywaynepower gregorywaynepower marked this pull request as draft January 2, 2024 22:38
@elpaso
Copy link
Contributor

elpaso commented Jan 3, 2024

@elpaso So were you planning on axing QGIS Server in its entirety or just the Catalog feature?

Just the catalog.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@gregorywaynepower
Copy link
Contributor Author

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

This has been reverted in 4967b29.

@gregorywaynepower gregorywaynepower marked this pull request as ready for review January 9, 2024 17:23
@gregorywaynepower
Copy link
Contributor Author

gregorywaynepower commented Jan 9, 2024

@haubourg & @elpaso :

I've held off from adding the following recommendations from StepSecurity for this repo for the time being:

  • Add step-security/harden-runner - This would introduce a large amount of labor and I wasn't sure if this were a large load of false positives or not.
  • Add CodeQL Workflow ( SAST Tool) - This would introduce a large amount of labor and I wasn't sure if this were a large load of false positives or not.
  • Add Dependency Review Workflow - I wasn't sure if this were a large load of false positives or not.
  • Update the pre-commit configuration - I don't want to interfered with your existing linting.

I can understand if adding OpenSSF's GitHub Action may be a bit of a large ask. I can break the following out into a separate pull request if you all are concerned about additional labor for maintainers:

  • Add your OpenSSF Scorecard to the README
  • OpenSSF Best Practices Badge to the README
  • include the osv-scanner.toml file to remove the Vulnerability positives from the OpenSSF scorecard CLI Tool.

Copy link
Member

@haubourg haubourg left a comment

Choose a reason for hiding this comment

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

@gregorywaynepower Hello, sorry for the lag.
I would focus the PR on the OSSF activation part, ie. readme, actions and artifacts creation.
Fixing dependency and docker versions should probably be tackled in a subsequent approach where will probably discuss a lot about maintenance, real exposure etc.. I'd be happy to have other dev's opinion here

.ci/ogc/Dockerfile Outdated Show resolved Hide resolved
.github/workflows/backport.yml Outdated Show resolved Hide resolved
@gregorywaynepower
Copy link
Contributor Author

gregorywaynepower commented Jan 14, 2024

@haubourg I can understand the lag--there is a lot going on in this pull request. I have no problem with having the addition of OpenSSF's GitHub Action and making decisions on what recommendations to implement as a separate pull request so you aren't inundated with notifications from OpenSSF's GitHub Action.

For context, all those "StepSecurity" commits are what the OpenSSF GitHub Action will pester you about adding.

Copy link

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jan 31, 2024
@gregorywaynepower gregorywaynepower marked this pull request as draft January 31, 2024 02:53
@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jan 31, 2024
@gregorywaynepower
Copy link
Contributor Author

gregorywaynepower commented Jan 31, 2024

Hello Folks,

I'm closing this pull request since we should address the addition of the Open Source Security Foundation's Scorecard GitHub Action incrementally. Thank you all for your input so far in this process.

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.

4 participants