Skip to content

Commit f8b20e2

Browse files
authored
Merge branch 'main' into smockle/results
2 parents 0c0448c + 3beb05d commit f8b20e2

File tree

8 files changed

+218
-55
lines changed

8 files changed

+218
-55
lines changed

.github/actions/file/src/Issue.ts

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,63 @@
11
import type { Issue as IssueInput } from "./types.d.js";
22

33
export class Issue implements IssueInput {
4-
/**
5-
* Extracts owner, repository, and issue number from a GitHub issue URL.
6-
* @param issueUrl A GitHub issue URL (e.g. `https://github.com/owner/repo/issues/42`).
7-
* @returns An object with `owner`, `repository`, and `issueNumber` keys.
8-
* @throws The provided URL is unparseable due to its unexpected format.
9-
*/
10-
static parseIssueUrl(issueUrl: string): {
4+
#url!: string;
5+
#parsedUrl!: {
116
owner: string;
127
repository: string;
138
issueNumber: number;
14-
} {
15-
const { owner, repository, issueNumber } =
16-
/\/(?<owner>[^/]+)\/(?<repository>[^/]+)\/issues\/(?<issueNumber>\d+)(?:[/?#]|$)/.exec(
17-
issueUrl
18-
)?.groups || {};
19-
if (!owner || !repository || !issueNumber) {
20-
throw new Error(`Could not parse issue URL: ${issueUrl}`);
21-
}
22-
return { owner, repository, issueNumber: Number(issueNumber) };
23-
}
24-
25-
url: string;
9+
};
2610
nodeId: string;
2711
id: number;
2812
title: string;
2913
state?: "open" | "reopened" | "closed";
3014

15+
constructor({ url, nodeId, id, title, state }: IssueInput) {
16+
this.url = url;
17+
this.nodeId = nodeId;
18+
this.id = id;
19+
this.title = title;
20+
this.state = state;
21+
}
22+
23+
set url(newUrl: string) {
24+
this.#url = newUrl;
25+
this.#parsedUrl = this.#parseUrl();
26+
}
27+
28+
get url(): string {
29+
return this.#url;
30+
}
31+
3132
get owner(): string {
32-
return Issue.parseIssueUrl(this.url).owner;
33+
return this.#parsedUrl.owner;
3334
}
3435

3536
get repository(): string {
36-
return Issue.parseIssueUrl(this.url).repository;
37+
return this.#parsedUrl.repository;
3738
}
3839

3940
get issueNumber(): number {
40-
return Issue.parseIssueUrl(this.url).issueNumber;
41+
return this.#parsedUrl.issueNumber;
4142
}
4243

43-
constructor({ url, nodeId, id, title, state }: IssueInput) {
44-
this.url = url;
45-
this.nodeId = nodeId;
46-
this.id = id;
47-
this.title = title;
48-
this.state = state;
44+
/**
45+
* Extracts owner, repository, and issue number from the Issue instance’s GitHub issue URL.
46+
* @returns An object with `owner`, `repository`, and `issueNumber` keys.
47+
* @throws The provided URL is unparseable due to its unexpected format.
48+
*/
49+
#parseUrl(): {
50+
owner: string;
51+
repository: string;
52+
issueNumber: number;
53+
} {
54+
const { owner, repository, issueNumber } =
55+
/\/(?<owner>[^/]+)\/(?<repository>[^/]+)\/issues\/(?<issueNumber>\d+)(?:[/?#]|$)/.exec(
56+
this.#url
57+
)?.groups || {};
58+
if (!owner || !repository || !issueNumber) {
59+
throw new Error(`Could not parse issue URL: ${this.#url}`);
60+
}
61+
return { owner, repository, issueNumber: Number(issueNumber) };
4962
}
5063
}

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
login_url: http://127.0.0.1:4000/
7575
username: ${{ secrets.TEST_USERNAME }}
7676
password: ${{ secrets.TEST_PASSWORD }}
77-
repository: github-community-projects/continuous-ai-for-accessibility-scanner
77+
repository: github-community-projects/continuous-ai-for-accessibility-scanner-testing
7878
token: ${{ secrets.GH_TOKEN }}
7979
cache_key: ${{ steps.cache_key.outputs.cache_key }}
8080

@@ -89,7 +89,7 @@ jobs:
8989
npm ci
9090
npm run test
9191
env:
92-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
9393
CACHE_PATH: ${{ steps.cache_key.outputs.cache_key }}
9494

9595
- name: Clean up issues and pull requests
@@ -118,7 +118,7 @@ jobs:
118118
fi
119119
done
120120
env:
121-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
121+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
122122

123123
- name: Clean up cached results
124124
if: ${{ always() }}

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at <[email protected]>. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct/][version]
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
[version]: https://www.contributor-covenant.org/version/1/4/code-of-conduct/

CONTRIBUTING.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Contributing
2+
3+
[fork]: https://github.com/github-community-projects/continuous-ai-for-accessibility-scanner/fork
4+
[pr]: https://github.com/github-community-projects/continuous-ai-for-accessibility-scanner/compare
5+
6+
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
7+
8+
Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE).
9+
10+
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
11+
12+
## Submitting a pull request
13+
14+
Thank you for your interest in this GitHub action, however, right now we are not taking contributions.
15+
16+
17+
## Resources
18+
19+
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
20+
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
21+
- [GitHub Support](https://support.github.com)

README.md

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ The a11y scanner helps teams:
1212
1313
---
1414

15+
## Requirements
16+
17+
This project is a GitHub Actions action. A GitHub Actions workflow is required to run it, and you must have available GitHub Actions minutes.
18+
19+
📚 [Understanding GitHub Actions](https://docs.github.com/en/actions/get-started/understand-github-actions) | [Quickstart for GitHub Actions](https://docs.github.com/en/actions/get-started/quickstart) | [Writing workflows](https://docs.github.com/en/actions/how-tos/write-workflows) | [GitHub Actions billing](https://docs.github.com/en/billing/concepts/product-billing/github-actions)
1520
## Getting Started
1621

1722
### 1. Add a Workflow File
@@ -26,23 +31,13 @@ jobs:
2631
accessibility_scanner:
2732
runs-on: ubuntu-latest
2833
steps:
29-
# Retrieve the scanner code
30-
- uses: actions/checkout@v5
31-
with:
32-
repository: github-community-projects/continuous-ai-for-accessibility-scanner
33-
ref: v1
34-
token: ${{ secrets.GH_COMMUNITY_PROJECTS_TOKEN }} # This token must have read access to github-community-projects/continuous-ai-for-accessibility-scanner; more information below.
35-
path: ./.github/actions/continuous-ai-for-accessibility-scanner
36-
# Prepare the scanner to run
37-
- shell: bash
38-
run: cp -Rf ./.github/actions/continuous-ai-for-accessibility-scanner/.github/actions/* ./.github/actions
39-
# Run the scanner
40-
- uses: ./.github/actions/continuous-ai-for-accessibility-scanner
34+
- uses: github-community-projects/continuous-ai-for-accessibility-scanner@v1
4135
with:
4236
urls: | # Provide a newline-delimited list of URLs to scan; more information below.
4337
REPLACE_THIS
4438
repository: REPLACE_THIS/REPLACE_THIS # Provide a repository name-with-owner (in the format "primer/primer-docs"). This is where issues will be filed and where Copilot will open PRs; more information below.
4539
token: ${{ secrets.GH_TOKEN }} # This token must have write access to the repo above (contents, issues, and PRs); more information below. Note: GitHub Actions’ `GITHUB_TOKEN` (https://docs.github.com/en/actions/tutorials/authenticate-with-github_token) cannot be used here.
40+
cache_key: REPLACE_THIS # Provide a filename that will be used when caching results. We recommend including the name or domain of the site being scanning.
4641
```
4742
4843
> 👉 Update all `REPLACE_THIS` placeholders with your actual values. See [Action Inputs](#action-inputs) for details.
@@ -56,15 +51,9 @@ Required Permissions:
5651

5752
---
5853

59-
### 2. Create Tokens and Add Secrets
60-
61-
The a11y scanner requires two Personal Access Tokens (PATs) as repository secrets:
54+
### 2. Create a Token and Add a Secret
6255

63-
#### The `GH_COMMUNITY_PROJECTS_TOKEN` is a fine-grained PAT with
64-
65-
- `contents: read`
66-
- `metadata: read`
67-
- Scope: [`github-community-projects/continuous-ai-for-accessibility-scanner`](https://github.com/github-community-projects/continuous-ai-for-accessibility-scanner)
56+
The a11y scanner requires a Personal Access Token (PAT) as repository secret:
6857

6958
#### The `GH_TOKEN` is a fine-grained PAT with
7059

@@ -73,7 +62,7 @@ The a11y scanner requires two Personal Access Tokens (PATs) as repository secret
7362
- `issues: write`
7463
- `pull-requests: write`
7564
- `metadata: read`
76-
- Scope: Your target repository (where issues and PRs will be created)
65+
- Scope: Your target repository (where issues and PRs will be created) and the repository containing your workflow
7766

7867
> 👉 GitHub Actions' default `GITHUB_TOKEN` cannot be used here.
7968

@@ -129,8 +118,24 @@ The a11y scanner leverages Copilot coding agent, which can be configured with cu
129118

130119
## Feedback
131120

132-
Beta participants have direct contact for questions and suggestions. A public feedback form will be available once the project is open-sourced.
121+
Please refer to the [CONTRIBUTING](./CONTRIBUTING.md) file for more information.
122+
123+
## License
124+
125+
This project is licensed under the terms of the MIT open source license. Please refer to the [LICENSE](./LICENSE) file for the full terms.
126+
127+
## Maintainers
128+
129+
Please refer to the [CODEOWNERS](./.github/CODEOWNERS) file for more information.
130+
131+
## Support
132+
133+
Please refer to the [SUPPORT](./SUPPORT.md) file for more information.
134+
135+
## Acknowledgement
136+
137+
Thank you to our beta testers for their help in testing this project.
133138

134139
---
135140

136-
*Last updated: 2025-10-01*
141+
*Last updated: 2025-10-09*

SECURITY.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Thanks for helping make GitHub safe for everyone.
2+
3+
# Security
4+
5+
GitHub takes the security of our software products and services seriously, including all of the open source code repositories managed through our GitHub organizations, such as [GitHub](https://github.com/GitHub).
6+
7+
Even though [open source repositories are outside of the scope of our bug bounty program](https://bounty.github.com/index.html#scope) and therefore not eligible for bounty rewards, we will ensure that your finding gets passed along to the appropriate maintainers for remediation.
8+
9+
## Reporting Security Issues
10+
11+
If you believe you have found a security vulnerability in any GitHub-owned repository, please report it to us through coordinated disclosure.
12+
13+
**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.**
14+
15+
Instead, please send an email to opensource-security[@]github.com.
16+
17+
Please include as much of the information listed below as you can to help us better understand and resolve the issue:
18+
19+
* The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
20+
* Full paths of source file(s) related to the manifestation of the issue
21+
* The location of the affected source code (tag/branch/commit or direct URL)
22+
* Any special configuration required to reproduce the issue
23+
* Step-by-step instructions to reproduce the issue
24+
* Proof-of-concept or exploit code (if possible)
25+
* Impact of the issue, including how an attacker might exploit the issue
26+
27+
This information will help us triage your report more quickly.
28+
29+
## Policy
30+
31+
See [GitHub's Safe Harbor Policy](https://docs.github.com/en/site-policy/security-policies/github-bug-bounty-program-legal-safe-harbor#1-safe-harbor-terms)

SUPPORT.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Support
2+
3+
## How to file issues and get help
4+
5+
This project uses GitHub Issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new issue.
6+
7+
For help or questions about using this project, please open an issue for support requests, usage questions, or general inquiries. At this time, GitHub Discussions are not enabled. All communication should occur via issues.
8+
9+
## Project Maintenance Status
10+
11+
This repo `continuous-ai-for-accessibility-scanner` is under active development and maintained by GitHub staff during the public preview state. We will do our best to respond to support, feature requests, and community questions in a timely manner.
12+
13+
## Important Notice
14+
15+
This project is a work in progress, and we do not guarantee that code fixes or suggestions produced by Copilot will be fully accessible. Please use caution when applying the suggestions it provides. Always confirm or verify Copilot's recommendations with an accessibility subject matter expert before using them in production.
16+
17+
## GitHub Support Policy
18+
19+
Support for this project is limited to the resources listed above (GitHub Issues).

sites/site-with-errors/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ GEM
101101
public_suffix (6.0.2)
102102
puma (7.0.4)
103103
nio4r (~> 2.0)
104-
rack (3.2.2)
104+
rack (3.2.3)
105105
rake (13.3.0)
106106
rb-fsevent (0.11.2)
107107
rb-inotify (0.11.1)

0 commit comments

Comments
 (0)