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

Resolve CodeQL alert 3 "Potentially unsafe external link" #6044

Closed
6 tasks done
Tracked by #5129
roslynwythe opened this issue Jan 3, 2024 · 8 comments · Fixed by #6362
Closed
6 tasks done
Tracked by #5129

Resolve CodeQL alert 3 "Potentially unsafe external link" #6044

roslynwythe opened this issue Jan 3, 2024 · 8 comments · Fixed by #6362
Assignees
Labels
Added to dev/pm agenda Feature: Code Alerts good first issue Good for newcomers P-Feature: Toolkit https://www.hackforla.org/toolkit/ role: back end/devOps Tasks for back-end developers role: front end Tasks for front end developers size: 0.25pt Can be done in 0.5 to 1.5 hours
Milestone

Comments

@roslynwythe
Copy link
Member

roslynwythe commented Jan 3, 2024

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

We need to resolve the alert "Potentially unsafe external link" which appears in the CodeQL alert 3 by adding the attribute rel="noopener noreferrer"

Action Items

  • The following item is required for GitHub to establish tracking between this issue and the alert. No action is required. You may simply check the checkbox. If you do follow the link to learn more about CodeQL alerts, DO NOT DISMISS THE ALERT.
  • https://github.com/hackforla/website/security/code-scanning/3
  • Open the file _includes/current-guides.html in your IDE
  • Replace
<h3><a href="{{item.resource-url}}" target="_blank">{{ item.title }}</a></h3>

with

<h3><a href="{{item.resource-url}}"  target="_blank" rel="noopener noreferrer">{{ item.title }}</a></h3>
  • Using Docker, check the url /toolkit and check that the page remains the same in mobile, tablet, and desktop views as on the current website (See 2 in the Resources/Instructions section below). Check to make sure that the links "2FA Guide" and "Figma" are still functional.

Merge Team

Resources/Instructions

  1. GitHub CodeQL documentation
  2. Webpage: https://www.hackforla.org/toolkit
  3. This issue is part of Epic: Create issues to resolve CodeQL alerts 1- 24, 98 "Potentially unsafe external link" #5129
@roslynwythe roslynwythe added Feature Missing This label means that the issue needs to be linked to a precise feature label. size: missing role missing Complexity: Missing labels Jan 3, 2024

This comment was marked as outdated.

@roslynwythe roslynwythe added good first issue Good for newcomers Feature: Code Alerts size: 0.25pt Can be done in 0.5 to 1.5 hours P-Feature: Toolkit https://www.hackforla.org/toolkit/ role: front end Tasks for front end developers role: back end/devOps Tasks for back-end developers Ready for Prioritization and removed Feature Missing This label means that the issue needs to be linked to a precise feature label. size: missing role missing Complexity: Missing labels Jan 3, 2024
@ExperimentsInHonesty ExperimentsInHonesty added this to the 02. Security milestone Jan 23, 2024
@duojet2ez duojet2ez self-assigned this Jan 26, 2024
Copy link

Hi @duojet2ez, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:-
i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?)
ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

@duojet2ez
Copy link
Member

eta: 1 week

availability: m - f day

@duojet2ez
Copy link
Member

Just an update:
Progress: I have completed this issue and tested locally

Blockers: The only difficulty is figuring out how to use github to merge this issue in the main branch. I am currently researching the process by reading the hack la documentation

Availability: I have 6 hours this week

ETA: Should be done when I figure out how github works... so soon theoretically

@github-actions github-actions bot added the To Update ! No update has been provided label Feb 9, 2024
Copy link

github-actions bot commented Feb 9, 2024

@duojet2ez

Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."

If you need help, be sure to either: 1) place your issue in the Questions/In Review column of the Project Board and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel. Please note that including your questions in the issue comments- along with screenshots, if applicable- will help us to help you. Here and here are examples of well-formed questions.

You are receiving this comment because your last comment was before Monday, February 5, 2024 at 11:06 PM PST.

duojet2ez added a commit to duojet2ez/website that referenced this issue Feb 10, 2024
@duojet2ez
Copy link
Member

progress: I pushed my local branch to the remote repository "resolve-code-qlalert-6044" following the written guide

Blockers: Not familiar enough with github to understand what I am supposed to do next. Waiting for next Thursday office hours to ask questions

Availability: I have 5 hours to work on this although pending questions that need to be answered

ETA: Probably Thursday Feb 15

@github-actions github-actions bot removed the To Update ! No update has been provided label Feb 16, 2024
@djbradleyii
Copy link
Member

@roslynwythe This issue is in regards to line 77 but there is an anchor tag on line 80 with the same issue. I don't see an issue related to line 80 to add rel="noopener noreferrer". Should we be updating the second link as well? File location: https://github.com/hackforla/website/blob/gh-pages/_includes/current-guides.html or are we waiting for CodeQL to flag it before we handle the fix? I am not sure of the protocol.

@roslynwythe
Copy link
Member Author

roslynwythe commented Mar 20, 2024

@roslynwythe This issue is in regards to line 77 but there is an anchor tag on line 80 with the same issue. I don't see an issue related to line 80 to add rel="noopener noreferrer". Should we be updating the second link as well? File location: https://github.com/hackforla/website/blob/gh-pages/_includes/current-guides.html or are we waiting for CodeQL to flag it before we handle the fix? I am not sure of the protocol.

@djbradleyii You are correct - there doesn't seem to be an alert regarding line 80, which is puzzling. I created #6484 to address the problem and also #6485 to document the problem. Thanks very much for bringing this to our attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Added to dev/pm agenda Feature: Code Alerts good first issue Good for newcomers P-Feature: Toolkit https://www.hackforla.org/toolkit/ role: back end/devOps Tasks for back-end developers role: front end Tasks for front end developers size: 0.25pt Can be done in 0.5 to 1.5 hours
Projects
Development

Successfully merging a pull request may close this issue.

4 participants