From daff14239a40c4e3be837c12f785c9f5bce5a8b4 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 13 Oct 2026 13:46:32 +0000
Subject: [PATCH 1/7] Apply remaining changes
Co-authored-by: abdulahmad307 <204748719+abdulahmad307@users.noreply.github.com>
---
.github/actions/find/src/findForUrl.ts | 2 +-
.github/actions/find/src/types.d.ts | 1 +
.github/actions/find/tests/findForUrl.test.ts | 15 +++++++++++++++
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.github/actions/find/src/findForUrl.ts b/.github/actions/find/src/findForUrl.ts
index 163df959..b6e7661f 100644
--- a/.github/actions/find/src/findForUrl.ts
+++ b/.github/actions/find/src/findForUrl.ts
@@ -44,7 +44,7 @@ export async function findForUrl(
if (includeScreenshots) {
screenshotId = await generateScreenshots(page)
}
- findings.push({...findingData, screenshotId})
+ findings.push({...findingData, screenshotId, originalUrl: url})
}
try {
diff --git a/.github/actions/find/src/types.d.ts b/.github/actions/find/src/types.d.ts
index 678474d6..0132b9d2 100644
--- a/.github/actions/find/src/types.d.ts
+++ b/.github/actions/find/src/types.d.ts
@@ -17,6 +17,7 @@ export type Finding = {
solutionLong?: string
screenshotId?: string
ruleId?: string
+ originalUrl?: string
}
export type Cookie = {
diff --git a/.github/actions/find/tests/findForUrl.test.ts b/.github/actions/find/tests/findForUrl.test.ts
index 89474f01..20cf4e12 100644
--- a/.github/actions/find/tests/findForUrl.test.ts
+++ b/.github/actions/find/tests/findForUrl.test.ts
@@ -335,6 +335,21 @@ describe('findForUrl', () => {
])
})
+ it('adds the original url to each finding', async () => {
+ actionInput = ''
+ clearAll()
+ vi.mocked(AxeBuilder.prototype.analyze).mockResolvedValueOnce({
+ violations: [
+ {id: 'r', help: 'h', helpUrl: 'https://example.com', description: 'd', tags: [], nodes: [{html: '', target: ['a']}]},
+ ],
+ } as unknown as axe.AxeResults)
+
+ const findings = await findForUrl({url: 'https://original.example/page'})
+
+ expect(findings).toHaveLength(1)
+ expect(findings[0].originalUrl).toBe('https://original.example/page')
+ })
+
describe('axe finding categorization', () => {
function axeViolation(tags: string[]) {
return {
From d6422b888ddd946c50f3264a57eb0db975989a34 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 13 Oct 2026 17:14:48 +0000
Subject: [PATCH 2/7] Format original URL test case
Co-authored-by: abdulahmad307 <204748719+abdulahmad307@users.noreply.github.com>
---
.github/actions/find/tests/findForUrl.test.ts | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/.github/actions/find/tests/findForUrl.test.ts b/.github/actions/find/tests/findForUrl.test.ts
index 20cf4e12..a8de52ed 100644
--- a/.github/actions/find/tests/findForUrl.test.ts
+++ b/.github/actions/find/tests/findForUrl.test.ts
@@ -340,7 +340,14 @@ describe('findForUrl', () => {
clearAll()
vi.mocked(AxeBuilder.prototype.analyze).mockResolvedValueOnce({
violations: [
- {id: 'r', help: 'h', helpUrl: 'https://example.com', description: 'd', tags: [], nodes: [{html: '', target: ['a']}]},
+ {
+ id: 'r',
+ help: 'h',
+ helpUrl: 'https://example.com',
+ description: 'd',
+ tags: [],
+ nodes: [{html: '', target: ['a']}],
+ },
],
} as unknown as axe.AxeResults)
From e03a0ff46c541c83f3181f81cff5f8fbd7236fb8 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 13 Oct 2026 18:18:08 +0000
Subject: [PATCH 3/7] Account for originalUrl in scan result test
Co-authored-by: abdulahmad307 <204748719+abdulahmad307@users.noreply.github.com>
---
tests/site-with-errors.test.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/site-with-errors.test.ts b/tests/site-with-errors.test.ts
index 4a6b00ef..59c66146 100644
--- a/tests/site-with-errors.test.ts
+++ b/tests/site-with-errors.test.ts
@@ -39,10 +39,11 @@ describe('site-with-errors', () => {
it('cache has expected results', () => {
const actual = results.map(({issue: {url: issueUrl}, findings}) => {
- const {problemUrl, solutionLong, screenshotId, nodes, ...finding} = findings[0]
+ const {problemUrl, solutionLong, screenshotId, nodes, originalUrl, ...finding} = findings[0]
// Check volatile fields for existence only
expect(issueUrl).toBeDefined()
expect(problemUrl).toBeDefined()
+ expect(originalUrl).toBeDefined()
// Axe-specific assertions
if (finding.scannerType === 'axe') {
expect(solutionLong).toBeDefined()
From 829822d81c33a09605c11dcf97f4d057533e89ff Mon Sep 17 00:00:00 2001
From: Abdul Ahmad
Date: Tue, 13 Oct 2026 14:25:44 -0400
Subject: [PATCH 4/7] Add originalUrl property to types definition
---
.github/actions/file/src/types.d.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/actions/file/src/types.d.ts b/.github/actions/file/src/types.d.ts
index 08d85737..2a1551c5 100644
--- a/.github/actions/file/src/types.d.ts
+++ b/.github/actions/file/src/types.d.ts
@@ -10,6 +10,7 @@ export type Finding = {
category?: FindingCategory
ruleId?: string
url: string
+ originalUrl: string
html?: string
nodes?: FindingNode[]
problemShort: string
From aaa7f2d21fb1a8871a3018f40ccc8eabe138a4ff Mon Sep 17 00:00:00 2001
From: Abdul Ahmad
Date: Tue, 13 Oct 2026 14:26:03 -0400
Subject: [PATCH 5/7] Make originalUrl required in Solution type
Changed originalUrl from optional to required in the Solution type.
---
.github/actions/find/src/types.d.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/actions/find/src/types.d.ts b/.github/actions/find/src/types.d.ts
index 0132b9d2..96a40514 100644
--- a/.github/actions/find/src/types.d.ts
+++ b/.github/actions/find/src/types.d.ts
@@ -17,7 +17,7 @@ export type Finding = {
solutionLong?: string
screenshotId?: string
ruleId?: string
- originalUrl?: string
+ originalUrl: string
}
export type Cookie = {
From 59d0d0f240f4a8bc33351b8e8ce554de65551797 Mon Sep 17 00:00:00 2001
From: Abdul Ahmad
Date: Tue, 13 Oct 2026 14:31:08 -0400
Subject: [PATCH 6/7] Add originalUrl property to Finding type
---
tests/types.d.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/types.d.ts b/tests/types.d.ts
index ea72c54b..967a71eb 100644
--- a/tests/types.d.ts
+++ b/tests/types.d.ts
@@ -7,6 +7,7 @@ export type Finding = {
scannerType: string
ruleId?: string
url: string
+ originalUrl: string
html?: string
nodes?: FindingNode[]
problemShort: string
From d6dbf17e353a0a516e9b502508f855d7f3b09f8f Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 13 Oct 2026 18:51:44 +0000
Subject: [PATCH 7/7] Fix missing originalUrl build typing
Co-authored-by: abdulahmad307 <204748719+abdulahmad307@users.noreply.github.com>
---
.github/actions/find/src/findForUrl.ts | 15 +++++++++++----
.github/actions/find/src/pluginManager/types.ts | 4 ++--
.github/actions/find/src/types.d.ts | 2 ++
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/.github/actions/find/src/findForUrl.ts b/.github/actions/find/src/findForUrl.ts
index b6e7661f..14c4e30e 100644
--- a/.github/actions/find/src/findForUrl.ts
+++ b/.github/actions/find/src/findForUrl.ts
@@ -1,4 +1,11 @@
-import type {ColorSchemePreference, Finding, FindingCategory, ReducedMotionPreference, UrlConfig} from './types.d.js'
+import type {
+ ColorSchemePreference,
+ Finding,
+ FindingCategory,
+ FindingInput,
+ ReducedMotionPreference,
+ UrlConfig,
+} from './types.d.js'
import {AxeBuilder} from '@axe-core/playwright'
import {accesslintAudit} from '@accesslint/playwright'
import playwright from 'playwright'
@@ -39,7 +46,7 @@ export async function findForUrl(
)
const findings: Finding[] = []
- const addFinding = async (findingData: Finding) => {
+ const addFinding = async (findingData: FindingInput) => {
let screenshotId
if (includeScreenshots) {
screenshotId = await generateScreenshots(page)
@@ -92,7 +99,7 @@ async function runAxeScan({
excludeSelectors,
}: {
page: playwright.Page
- addFinding: (findingData: Finding, options?: {includeScreenshots?: boolean}) => Promise
+ addFinding: (findingData: FindingInput, options?: {includeScreenshots?: boolean}) => Promise
excludeSelectors?: string[]
}) {
const url = page.url()
@@ -129,7 +136,7 @@ async function runAccesslintScan({
addFinding,
}: {
page: playwright.Page
- addFinding: (findingData: Finding, options?: {includeScreenshots?: boolean}) => Promise
+ addFinding: (findingData: FindingInput, options?: {includeScreenshots?: boolean}) => Promise
}) {
const url = page.url()
core.info(`Scanning ${url} with AccessLint`)
diff --git a/.github/actions/find/src/pluginManager/types.ts b/.github/actions/find/src/pluginManager/types.ts
index 65b82469..20f39119 100644
--- a/.github/actions/find/src/pluginManager/types.ts
+++ b/.github/actions/find/src/pluginManager/types.ts
@@ -1,9 +1,9 @@
-import type {Finding} from '../types.d.js'
+import type {FindingInput} from '../types.d.js'
import playwright from 'playwright'
export type PluginDefaultParams = {
page: playwright.Page
- addFinding: (findingData: Finding) => Promise
+ addFinding: (findingData: FindingInput) => Promise
}
export type Plugin = {
diff --git a/.github/actions/find/src/types.d.ts b/.github/actions/find/src/types.d.ts
index 96a40514..47347f91 100644
--- a/.github/actions/find/src/types.d.ts
+++ b/.github/actions/find/src/types.d.ts
@@ -20,6 +20,8 @@ export type Finding = {
originalUrl: string
}
+export type FindingInput = Omit
+
export type Cookie = {
name: string
value: string