lintpage 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -55,6 +55,53 @@ In a pre-commit hook:
55
55
  npx lintpage localhost:3000 --quiet
56
56
  ```
57
57
 
58
+ ### Redirects to another site
59
+
60
+ If the page redirects to a different host, the audit would only see that
61
+ other site, so the CLI reports a CRITICAL `redirected-off-site` finding and
62
+ exits `1`. Adding or removing `www.`, switching from http to https, and a
63
+ different path on the same host do not count; a move to a subdomain or to
64
+ another country domain does. This holds whether the other site answers or
65
+ fails; a redirect the CLI refuses to follow at all, such as one to a private
66
+ address, is reported as `target-unreachable` instead. If the redirect is
67
+ intended, audit the final URL instead, or set the rule to `false` or a lower
68
+ severity in your config. With `--ai-only`, which does not fetch the page
69
+ itself, the same check runs on where the AI bot probes ended up.
70
+
71
+ ### Vercel deployments
72
+
73
+ A deployment behind Vercel Deployment Protection redirects to the Vercel login
74
+ page. Without access, LintPage reports that as `redirected-off-site` and
75
+ names the cause. To audit the deployment itself, create a Protection Bypass
76
+ for Automation secret in Vercel (Project Settings, Deployment Protection),
77
+ then pass it in the environment together with the deployment it is for:
78
+
79
+ ```bash
80
+ VERCEL_AUTOMATION_BYPASS_SECRET=... \
81
+ LINTPAGE_BYPASS_ORIGINS=https://my-app-git-feature-team.vercel.app \
82
+ npx lintpage https://my-app-git-feature-team.vercel.app
83
+ ```
84
+
85
+ The secret is read from the environment only, never from a flag, and is never
86
+ printed. It is sent as the `x-vercel-protection-bypass` header only when the
87
+ target is an https `*.vercel.app` URL whose origin is listed in
88
+ `LINTPAGE_BYPASS_ORIGINS` (comma or space separated), and then only to that
89
+ exact origin: not to any other site the audit contacts, and not along a
90
+ redirect to another host. `*.vercel.app` alone is not enough, because it
91
+ covers every Vercel customer's deployments. The CLI says on stderr whether
92
+ and where the secret was sent. Like any request header, it is visible to
93
+ tools that observe the process's HTTP traffic, such as an APM agent or a
94
+ TLS-intercepting proxy.
95
+
96
+ Vercel also sends `X-Robots-Tag: noindex` on its deployment URLs, so previews
97
+ stay out of search results. On an https `*.vercel.app` target, that noindex
98
+ finding is therefore reported as INFO rather than CRITICAL, and the output
99
+ says so. A `nofollow` in the same header, or a `noindex` in the page's robots
100
+ meta tag, keeps its severity. If your production site itself is served from
101
+ `*.vercel.app`, set a severity for `x-robots-tag` in your config (for example
102
+ `{ "enabled": true, "severity": "CRITICAL" }`) to restore the check; a
103
+ severity you configure is always used.
104
+
58
105
  ### Output
59
106
 
60
107
  ```
@@ -76,6 +123,19 @@ Exit codes:
76
123
  - `1` — critical issues found (or warnings with `--fail-on-warning`)
77
124
  - `2` — runtime error
78
125
 
126
+ ## Upgrading from 0.5.1
127
+
128
+ - A page that redirects to another host now fails with `redirected-off-site`
129
+ (exit `1`). Before, the audit quietly checked the other site. This includes
130
+ moves to a subdomain or another country domain; see above for how to accept
131
+ an intended redirect.
132
+ - On an https `*.vercel.app` target, Vercel's `X-Robots-Tag: noindex` is
133
+ reported as INFO instead of CRITICAL (see above).
134
+ - `--quiet` now applies to `--format github`, and with `--format github` a URL
135
+ whose audit cannot run gets an error annotation.
136
+ - GitHub annotation text no longer shows `%3A` and `%2C` in place of `:` and
137
+ `,`, and the job summary is new.
138
+
79
139
  ## Options
80
140
 
81
141
  | Flag | Description |
@@ -85,7 +145,7 @@ Exit codes:
85
145
  | `--fail-on-warning` | Exit 1 on warnings, not just criticals |
86
146
  | `--ai-only` | Run only the AI Visibility module (LP-050–LP-060) |
87
147
  | `--skip-ai` | Skip the AI Visibility module |
88
- | `--quiet` | Minimal output (counts only) |
148
+ | `--quiet` | Minimal output: counts only; with `--format github`, the verdict and notices plus critical annotations (and warnings with `--fail-on-warning`) |
89
149
 
90
150
  ## Rules
91
151
 
@@ -96,6 +156,7 @@ LintPage checks **60 rules** out of the box across five categories:
96
156
  | Rule | Severity | What it checks |
97
157
  | ------------------ | -------- | ----------------------------------------------------- |
98
158
  | `robots-noindex` | CRITICAL | Robots noindex/nofollow directives |
159
+ | `redirected-off-site` | CRITICAL | The page redirected to another host (CLI only) |
99
160
  | `ssl` | CRITICAL | Site served over HTTPS |
100
161
  | `x-robots-tag` | CRITICAL | X-Robots-Tag HTTP header noindex/nofollow |
101
162
  | `robots-txt-check` | WARNING | robots.txt presence and validity |
@@ -235,7 +296,9 @@ Use the `github` format for native annotations:
235
296
  run: npx lintpage https://your-site.com --format github --fail-on-warning
236
297
  ```
237
298
 
238
- This outputs GitHub-compatible annotations that show up directly on your PR.
299
+ This outputs GitHub-compatible annotations that show up on your PR's checks. The verdict comes first, and each finding's annotation names the page it is about; a URL whose audit cannot run gets an error annotation. When `GITHUB_STEP_SUMMARY` is set, as it is in GitHub Actions, the CLI also adds a section per URL to the job summary: verdict, score, counts and the top findings.
300
+
301
+ For preview deployments, the [LintPage GitHub Action](https://github.com/marketplace/actions/lintpage-seo-check) runs this for you on each `deployment_status` event.
239
302
 
240
303
  ## License
241
304