CLI command
probierz evaluate legal
Say whether a product's legal pages are there for its customers: each answers with words and is linked from the page they start at, and that page sets no cookie but the essential ones before anyone agreed to it.
Invocation#
probierz evaluate legal --app <APP_ID>Required inputs and options#
--appnames the product. Its manifest declareslegal: {linkedFrom: <the page customers start at>, pages: {privacy: <url>, terms: <url>, …}, essentialCookies: [<name>, …]}, every address http(s); the page names are the product's own.essentialCookiesis optional: the cookies the product needs to work, which ask no consent ([]when it needs none).- Example:
probierz evaluate legal --app shop.
Output and state effects#
Reads every link of linkedFrom (resolved against where it landed, without fragments), then asks for each page, following redirects, and prints JSON: appId, linkedFrom, pages (each name, url, verdict: answers for a 2xx answer with words once markup, scripts and styles are stripped, empty for a 2xx answer without any, broken for any other answer or none, with status, finalUrl, words or why, and linked: whether linkedFrom links to it), cookies (set: the name of each cookie linkedFrom set on a first visit, asked with no cookie; with essentialCookies, checked: true, essential and setBeforeConsent: each set cookie that is not essential; without it, checked: false and why; a cookie a script sets in the browser, or one set on a redirect before the page, is not seen) and pass, true only when every page answers and is linked and no cookie was set before consent; when it is false the command exits with the verdict refused, the result printed first.
Exact refusals#
legal-undeclared(probierz.legal, exit 1): nolegalsection, no page, an address that is not http(s), oressentialCookiesthat is not a list of cookie names, naming which; nothing is asked.from-unreachable(exit 69, error codeinfra_down): the start page could not be reached, answered an HTTP error or could not be read, so no page could be judged linked or not. Real test: tests/legal/pages.rs (the test product, itslegal-brokenandcookie-before-consentfaults).
Declared refusals#
What probierz refusals list declares for this command at revision d2cd6156e8b8dc6204dab7b46ec0b34b2bb03cea (probierz 0.1.7 (revision unknown, not built from a git checkout)): each cause's id, the operation declaring it, its exit status and code, and its remedy.
verdict-failed(probierz.verdict, exit 1, refused): {point}: the run completed and its verdict at {verdict} is false, blocked by {blockers}. read the result's blockers, errors or reason: each names what to fix in the artifact, the product or the declaration, then run the command again.verdict-missing(probierz.verdict, exit 1, refused): {point}: the result states no boolean verdict at {verdict}, so whether it passed is unknown. this is a defect of the command that produced the result: report it with the result shown.workspace-unset(probierz.manifest.discover, exit 1, config): finding the repositories that hold product manifests: this instance names no workspace, so there is no directory of repositories to look in. runprobierz config set workspace <directory holding one checkout per repository>.workspace-unreadable(probierz.manifest.discover, exit 1, config): listing {workspace}: the operating system would not list it: {error}. give this user read permission on {workspace}, or set another workspace withprobierz config set workspace.listing-failed(probierz.manifest.discover, exit 1, config): asking the git of {repository} which manifests it tracks: {cause}. make {repository} a git repository this user can read.untracked(probierz.manifest.discover, exit 1, config): reading the manifests of {repository}: {file} is not tracked by the repository's git, so no other host and no review sees it. rungit -C {repository} add {relative}and commit it, or remove the file.duplicate(probierz.manifest.discover, exit 1, config): finding the manifest of {app}: two repositories declare {app}: {first} and {second}. keep the manifest of {app} in the product's own repository and remove the other.not-found(probierz.manifest.discover, exit 1, config): finding the manifest of {app}: no repository under {workspace} has .probierz/{app}.yaml. add .probierz/{app}.yaml to the product's repository (probierz project adoptorprobierz author manifestwrite it), or name an appprobierz apps listlists.file-name-invalid(probierz.manifest.discover, exit 1, config): finding the manifests of {repository}: {file} names app "{app}", which is not an id: letters, digits, '.', '_' and '-', starting with a letter or digit. rename it .probierz/<appId>.yaml with the id it declares, withgit mv.repository-name-invalid(probierz.manifest.discover, exit 1, config): finding repository "{name}" in the workspace: a manifest names a checkout directly under the workspace, and "{name}" would name another place. name the checkout by its directory name under the workspace in repositories[].repository.app-id-invalid(probierz.manifest.load, exit 2, refused): naming an app: "{app}" is not an id: letters, digits, '.', '_' and '-', starting with a letter or digit. name an appprobierz apps listlists.manifest-unreadable(probierz.manifest.load, exit 1, config): reading {file}: {error}. write {file} as YAML the reader accepts (its line and column are named), then load it again.manifest-invalid(probierz.manifest.load, exit 1, config): judging {file}: {problem}. fix the declaration in {file};probierz app checknames every problem it has with the world once it loads.manifest-id-mismatch(probierz.manifest.load, exit 1, config): loading the manifest of {app}: {file} is named for {app} and declares appId {declared}. declareappId: {app}in {file}, or rename the file for the app it declares withgit mv.legal-undeclared(probierz.legal, exit 1, config): reading which legal pages {app} publishes: {problem}. declare in the product's manifestlegal: {linkedFrom: <the page customers start at>, pages: {privacy: <url>, terms: <url>}}, each an http(s) address.from-unreachable(probierz.legal, exit 69, infra_down): reading the links of {url}: {problem}. check that this machine reaches the page and that legal.linkedFrom names the page customers start at, then ask again.
Source snapshot#
Generated from the Rust binaries at revision 99a74945a3598a8d73b6c6cbe5aae4f283becea3 of Probierz's private source repository.
Combined help SHA-256: 77529678a61237f774b59e76df0d1907cb749ef5da56d2ed913b040793b7d30b; binary SHA-256: be9e0eaff0e6ea50403a0c6f6d467697a4eac676f9523b8dc13a596d2b5526c5.