github / github/accessibility-scanner

Cannot scan sites with self-signed SSL certs

未关闭
#150 3 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
369
派生
40
平均合并
1 天 9 小时
30 天内合并 PR
10

描述

Was giving this tool a little bit of a flex to see how it compares to our Lighthouse workflow, but found that it could not run against our testing environment, since the testing environment uses HTTPS with a self-signed SSL cert.

For context, we set up our testing environment dynamically in GitHub actions, and host it with docker/[DDEV](https://ddev.com/). When that environment is up, we can do Lighthouse, Playwright, and Selenium tests against that environment in GitHub CI to a similar degree that a developer could using their own computer.

When the local environment is set up, URLs that follow this pattern are available: `https://test.ddev.site/my-test-page`. When running this action against that example, we see an error like this:

```
Starting 'find' action
Preparing to scan https://test.ddev.site/my-test-page
node:internal/modules/run_main:107
triggerUncaughtException(
^
page.goto: net::ERR_CERT_AUTHORITY_INVALID at https://test.ddev.site/my-test-page
Call log:
- navigating to "https://test.ddev.site/my-test-page", waiting until "load"
at findForUrl (/home/runner/work/_actions/github/accessibility-scanner/current/.github/actions/find/dist/findForUrl.js:12:16)
at async Module.default (/home/runner/work/_actions/github/accessibility-scanner/current/.github/actions/find/dist/index.js:14:32)
at async file:///home/runner/work/_actions/github/accessibility-scanner/current/.github/actions/find/bootstrap.js:59:5
at async file:///home/runner/work/_actions/github/accessibility-scanner/current/.github/actions/find/bootstrap.js:31:1 {
name: 'Error'
}
Node.js v24.12.0
```

That error is thrown, and the rest of the job is completely skipped.

Maybe this action needs a new parameter so that the Playwright environment can use the [ignoreHTTPSErrors option](https://playwright.dev/docs/api/class-testoptions#test-options-ignore-https-errors)?

贡献指南

打开贡献指南

调研方向

从 .github/actions/find/dist/findForUrl.js 中显示的失败路径以及 .github/actions/find/dist/index.js 和 bootstrap.js 中 find action 的入口点开始,然后跟踪 Playwright 页面或浏览器上下文的配置位置。添加一种为扫描启用 ignoreHTTPSErrors 行为的方式,并验证示例自签名 HTTPS URL 能够完成,而不是中止 job。

由索引模型根据 Issue 内容生成。

评估

技术栈
github-actions, playwright, typescript
领域
ci-cd, testing-qa
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。