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

Create new issue template for resolution of CodeQL alert #5242

Open
4 tasks
Tracked by #5005
roslynwythe opened this issue Aug 17, 2023 · 3 comments
Open
4 tasks
Tracked by #5005

Create new issue template for resolution of CodeQL alert #5242

roslynwythe opened this issue Aug 17, 2023 · 3 comments
Labels
Complexity: Medium Dependency An issue is blocking the completion or starting of another issue Feature: Board/GitHub Maintenance Project board maintenance that we have to do repeatedly Feature: Code Alerts role: back end/devOps Tasks for back-end developers size: 1pt Can be done in 4-6 hours

Comments

@roslynwythe
Copy link
Member

roslynwythe commented Aug 17, 2023

Dependency

Overview

We require a generic issue template that can be used to resolve all CodeQL alerts. The only information required to target a particular alert is the alert number, which provides a link to the alert detail page, from which all details such as file path are available, along with an explanation of the alert and recommendations for resolution.

Action Items

  • Create a new file .github/ISSUE_TEMPLATE/resolve-CodeQL-alert.md
  • Copy/Paste the text below into the file, then save it
  • Refer to these instructions for testing the new template and preparing the Pull Request.

Content of issue template

---
name: Resolve CodeQL alert
about: Recommend dismissal or update code to resolve CodeQL alert
title: 'Resolve CodeQL Alert [INSERT-ALERTID]'
labels: 'Complexity: Medium, Feature: Code Alerts, role: front end, ready for dev lead, size: 1pt'
assignees: ''

---

### Prerequisite
1. Be a member of Hack for LA. (There are no fees to join.) If you have not joined yet, please follow the steps on our [Getting Started page](https://www.hackforla.org/getting-started).
2. Before you claim or start working on an issue, please make sure you have read our [How to Contribute to Hack for LA Guide](https://github.com/hackforla/website/blob/7f0c132c96f71230b8935759e1f8711ccb340c0f/CONTRIBUTING.md).

### Overview
As developers. we need to analyze [CodeQL query alert INSERT-ALERTID](https://github.com/hackforla/website/security/code-scanning/INSERT-ALERTID) and to either recommend dismissal of the alert or update the code to resolve the alert.    

### Action Items
- [ ] DO NOT DISMISS ANY ALERTS.  Dismissal of alerts should be done by dev leads only after review of the recommendation
- [ ] Browse to the link in the next Action Item and read the contents.  Click "See More" to view Recommendations, Examples and References.  
- [ ] https://github.com/hackforla/website/security/code-scanning/INSERT-ALERTID 
- [ ] Note these resources: 
   - [ ] See the wiki page "How to manage CodeQL alerts" (see under Resources)
   - [ ] To look at the resolution of similar alerts, visit the [code scanning page](https://github.com/hackforla/website/security/code-scanning) and query closed alerts for similar alert type.  To see the resolution of a closed alert, view the alert details and open the tracking issue (outlined in red in the screenshot under Resources)
- [ ] In a comment in this issue, provide your recommendation.  The recommendation can be one of the following: `dismiss as test`, `dismiss as false positive`, `dismiss as won't fix`, or `update code`.  An example of a 'false positive' is a report of a JavaScript syntax error that is caused by markdown or liquid symbols such as `---` or `{%`.  
- [ ] If the recommendation is to update code:
   - [ ] create an issue branch and proceed with the code update
   - [ ] Use docker to test locally, ensuring that there are no changes to any affected webpage(s)
   - [ ] proceed with pull request in the usual manner 
- [ ] If the recommendation is to dismiss, describe your reason for dismissal in the comment, then move the issue to `Questions/In Review` and apply the label `ready for dev lead`.  


### For merge team/dev lead
- [ ] If recommendation to dismiss is approved, dismiss the alert with a comment, then close the issue as completed.
- [ ] When this issue is closed please check off the dependency (under "Issues") in #5159.  If all issues are closed, close #5159 as completed.  
  
### Resources/Instructions
<details><summary>Screenshot of CodeQL alert detail page with tracking issue outlined in red</summary>

![CodeQLAlert](https://github.com/hackforla/website/assets/5314153/b74c4ec5-0297-4e30-b89a-097a088a47b3)

</details> 


- [GitHub CodeQL documentation](https://codeql.github.com/docs/codeql-overview/about-codeql/)
- [code scanning page](https://github.com/hackforla/website/security/code-scanning)
- Wiki page "How to resolve CodeQL alerts" (if this page has not been published yet, see the draft at https://github.com/hackforla/website/issues/6463#issuecomment-2002573270)
- This issue is part of #5159

Resources/Instructions

Testing Issue Templates

@roslynwythe roslynwythe added Feature Missing This label means that the issue needs to be linked to a precise feature label. role missing size: missing Draft Issue is still in the process of being created labels Aug 17, 2023
@github-actions

This comment was marked as outdated.

@anjolaaoluwa anjolaaoluwa added this to the 08. Team workflow milestone Aug 27, 2023
@ExperimentsInHonesty ExperimentsInHonesty added Feature: Infrastructure For changes on site technical architecture and removed Feature Missing This label means that the issue needs to be linked to a precise feature label. labels Aug 27, 2023
@roslynwythe roslynwythe added Complexity: Medium role: back end/devOps Tasks for back-end developers size: 1pt Can be done in 4-6 hours Feature: Board/GitHub Maintenance Project board maintenance that we have to do repeatedly and removed role missing size: missing labels Aug 30, 2023
@roslynwythe roslynwythe changed the title Create new issue template for reviewing CodeQL alerts Create new issue template for analysis of linter errors Aug 30, 2023
@roslynwythe roslynwythe changed the title Create new issue template for analysis of linter errors Create new issue template for review of linter alerts Aug 31, 2023
@roslynwythe roslynwythe added Feature: Administrative Administrative chores etc. ready for product and removed Feature: Administrative Administrative chores etc. Draft Issue is still in the process of being created Feature: Infrastructure For changes on site technical architecture labels Aug 31, 2023
@roslynwythe roslynwythe changed the title Create new issue template for review of linter alerts Create new issue template for review of CodeQL alert Sep 24, 2023
@roslynwythe roslynwythe added Draft Issue is still in the process of being created and removed ready for product labels Sep 24, 2023
@roslynwythe roslynwythe changed the title Create new issue template for review of CodeQL alert Create new issue template for resolution of CodeQL alert Oct 8, 2023
@roslynwythe roslynwythe added Dependency An issue is blocking the completion or starting of another issue and removed Draft Issue is still in the process of being created labels Mar 17, 2024
@ExperimentsInHonesty
Copy link
Member

ExperimentsInHonesty commented Mar 19, 2024

Readable version of template above - use for reviewing

Prerequisite

  1. Be a member of Hack for LA. (There are no fees to join.) If you have not joined yet, please follow the steps on our Getting Started page.
  2. Before you claim or start working on an issue, please make sure you have read our How to Contribute to Hack for LA Guide.

Overview

As developers. we need to analyze CodeQL query alert INSERT-ALERTID and to either recommend dismissal of the alert or update the code to resolve the alert.

Action Items

  • DO NOT DISMISS ANY ALERTS. Dismissal of alerts should be done by dev leads only after review of the recommendation
  • Browse to the link in the next Action Item and read the contents. Click "See More" to view Recommendations, Examples and References.
  • https://github.com/hackforla/website/security/code-scanning/INSERT-ALERTID
  • Note these resources:
    • See the wiki page "How to manage CodeQL alerts" (see under Resources)
    • To look at the resolution of similar alerts, visit the code scanning page and query closed alerts for similar alert type. To see the resolution of a closed alert, view the alert details and open the tracking issue (outlined in red in the screenshot under Resources)
  • In a comment in this issue, provide your recommendation. The recommendation can be one of the following: dismiss as test, dismiss as false positive, dismiss as won't fix, or update code. An example of a 'false positive' is a report of a JavaScript syntax error that is caused by markdown or liquid symbols such as --- or {%.
  • If the recommendation is to update code:
    • create an issue branch and proceed with the code update
    • Use docker to test locally, ensuring that there are no changes to any affected webpage(s)
    • proceed with pull request in the usual manner
  • If the recommendation is to dismiss, describe your reason for dismissal in the comment, then move the issue to Questions/In Review and apply the label ready for dev lead.

For merge team/dev lead

Resources/Instructions

Screenshot of CodeQL alert detail page with tracking issue outlined in red

CodeQLAlert

@roslynwythe
Copy link
Member Author

When #5059 is merged, this issue may be unnecessary, because the codeql.yml workflow will automatically generate issues to address open CodeQL alerts from the codebase. The only possible reason we would require an issue template for resolution of CodeQL alerts is if a CodeQL alert appears in a Pull Request and the assignee cannot resolve it, and we want a resolution prior to merging the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Medium Dependency An issue is blocking the completion or starting of another issue Feature: Board/GitHub Maintenance Project board maintenance that we have to do repeatedly Feature: Code Alerts role: back end/devOps Tasks for back-end developers size: 1pt Can be done in 4-6 hours
Projects
Development

No branches or pull requests

3 participants