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

(docs) Add documentation for new rule CPMR0076 #1107

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AdmiringWorm
Copy link
Member

Description Of Changes

This adds the new rule for flagging Icon URLs that make use of GitHub or
RawGit URLs in the nuspec file.

This rule is not currently planned for Package Validator, but is useful
to have as it will be implemented in the Chocolatey Community Validator
extension.

Motivation and Context

To document rules that are implemented in Chocolatey Community Validation extension, and considered for Package Validator.

Testing

  • I have previewed these changes using the Docker Container or another method before submitting this pull request.

Change Types Made

  • Minor documentation fix (typos etc.).
  • Major documentation change (refactoring, reformatting or adding documentation to existing page).
  • New documentation page added.
  • The change I have made should have a video added, and I have raised an issue for this.
    • Issue #

Change Checklist

  • Requires a change to menu structure (top or left-hand side)/
  • Menu structure has been updated

Related Issue

@AdmiringWorm AdmiringWorm self-assigned this Dec 5, 2024
@AdmiringWorm AdmiringWorm requested a review from gep13 December 5, 2024 13:35
@AdmiringWorm AdmiringWorm marked this pull request as ready for review December 5, 2024 13:35
<Callout type="warning">
This rule has not been implemented in Package Validator, and is only available in the Chocolatey Community Validation extension.

Once it has been implemented in Packge Validator, the severity or behavior may be changed in the Chocolatey Community Validation extension.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Once it has been implemented in Packge Validator, the severity or behavior may be changed in the Chocolatey Community Validation extension.
Once it has been implemented in Package Validator, the severity or behavior may be changed in the Chocolatey Community Validation extension.

order: 76
xref: cpmr0076
title: CPMR0076 - Raw GitHub Icon URL Is Used (nuspec)
description: Information on how to remediate the Chocloatey Package Moderation Rule 0076
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
description: Information on how to remediate the Chocloatey Package Moderation Rule 0076
description: Information on how to remediate the Chocolatey Package Moderation Rule 0076

## Recommended Solution

Please update the Icon URL to use an Icon that is coming from a proper CDN instead of GitHub or RawGit.
There existis CDN providers for GitHub links that can be used, like [JSDelivr](https://www.jsdelivr.com/) and [Statically](https://statically.io/).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
There existis CDN providers for GitHub links that can be used, like [JSDelivr](https://www.jsdelivr.com/) and [Statically](https://statically.io/).
There are CDN providers for GitHub links that can be used, like [JSDelivr](https://www.jsdelivr.com/) and [Statically](https://statically.io/).

Copy link
Member

Choose a reason for hiding this comment

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

Also, should we link to the section of the docs where this is discussed in more depth?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking of it, but I could only see a small section it was mentioned and couldn't be directly linked to.

I could only see it mentioned here: https://docs.chocolatey.org/en-us/community-repository/moderation/#requirements

but linking to that do not make it obvious where the relevant part is located.


## Reasoning

GitHub has expressed it being unwanted to hotlink to _raw_ files in the past as these are not static assets, and RawGit has shut down.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
GitHub has expressed it being unwanted to hotlink to _raw_ files in the past as these are not static assets, and RawGit has shut down.
GitHub has made it clear that hotlinking to _raw_ files on GitHub should be avoided, as these are not static assets, and RawGit has shut down.

Copy link
Member

Choose a reason for hiding this comment

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

Also, do we have a link to where we can point people to for the information about GitHub?

Copy link
Member Author

Choose a reason for hiding this comment

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

I have added a link to the blog post on GitHub regarding this that I am aware of.

This adds a new component that can be used to mark Package Validator
rules as not yet being implemented in Package Validator, but however has
been implemented in the Chocolatey Community Validation Extension.
This adds the new rule for flagging Icon URLs that make use of GitHub or
RawGit URLs in the nuspec file.

This rule is not currently planned for Package Validator, but is useful
to have as it will be implemented in the Chocolatey Community Validation
extension.
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.

2 participants