visual-access-contract 0.2.1__py3-none-any.whl
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.
- checks/__init__.py +0 -0
- checks/structured_check.py +175 -0
- checks/visual_check.py +163 -0
- evidence/__init__.py +0 -0
- evidence/reporter.py +148 -0
- vac/__init__.py +0 -0
- vac/__main__.py +40 -0
- vac/cli.py +98 -0
- vac/contract.py +256 -0
- vac/demo-contract.yaml +46 -0
- vac/demo.py +53 -0
- vac/demo_fixture.py +86 -0
- vac/html_report.py +92 -0
- vac/output.py +71 -0
- vac/runner.py +151 -0
- vac/session.py +63 -0
- visual_access_contract-0.2.1.dist-info/METADATA +146 -0
- visual_access_contract-0.2.1.dist-info/RECORD +22 -0
- visual_access_contract-0.2.1.dist-info/WHEEL +5 -0
- visual_access_contract-0.2.1.dist-info/entry_points.txt +2 -0
- visual_access_contract-0.2.1.dist-info/licenses/LICENSE +202 -0
- visual_access_contract-0.2.1.dist-info/top_level.txt +3 -0
vac/runner.py
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"""Run each selected check independently for each declared role and field."""
|
|
2
|
+
|
|
3
|
+
import asyncio
|
|
4
|
+
import json
|
|
5
|
+
import logging
|
|
6
|
+
|
|
7
|
+
from playwright.async_api import Browser, BrowserContext, Error, Locator, Page, async_playwright
|
|
8
|
+
|
|
9
|
+
from checks.structured_check import CheckResult, check_api_response, check_dom_text
|
|
10
|
+
from checks.visual_check import check_visual_region, ocr_from_png_bytes
|
|
11
|
+
from vac.contract import Contract, Rule, Scenario
|
|
12
|
+
from vac.session import configure, secret_for
|
|
13
|
+
|
|
14
|
+
LOGGER = logging.getLogger(__name__)
|
|
15
|
+
CHECKS = ("structured", "structured_dom", "visual")
|
|
16
|
+
TIMEOUT = 10_000
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _unavailable(check: str, scenario: str, role: str, rule: Rule, reason: str) -> CheckResult:
|
|
20
|
+
return CheckResult(check, scenario, role, rule.id, "inconclusive", reason)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _json_field(payload: object, json_path: str) -> object:
|
|
24
|
+
value = payload
|
|
25
|
+
for key in json_path[2:].split("."):
|
|
26
|
+
if not isinstance(value, dict):
|
|
27
|
+
raise KeyError(key)
|
|
28
|
+
value = value[key]
|
|
29
|
+
return value
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
async def _api_check(page: Page, source: str, scenario: str, role: str, rule: Rule) -> CheckResult:
|
|
33
|
+
try:
|
|
34
|
+
payload = await _read_json(page, source)
|
|
35
|
+
selected = _json_field(payload, rule.json_path)
|
|
36
|
+
return check_api_response(json.dumps(selected), rule.check_config(), role, scenario)
|
|
37
|
+
except (Error, ValueError, KeyError):
|
|
38
|
+
return _unavailable("structured", scenario, role, rule, "Selected API field could not be inspected")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
async def _read_json(page: Page, path: str) -> object:
|
|
42
|
+
# Browser fetch uses the same isolated authentication context as the page.
|
|
43
|
+
return await page.evaluate(
|
|
44
|
+
"""async path => {
|
|
45
|
+
const res = await fetch(path, {
|
|
46
|
+
redirect: "error", signal: AbortSignal.timeout(10000)
|
|
47
|
+
});
|
|
48
|
+
if (!res.ok) throw new Error("Request failed");
|
|
49
|
+
return await res.json();
|
|
50
|
+
}""",
|
|
51
|
+
path,
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
async def _visible(page: Page, selector: str) -> list[Locator]:
|
|
56
|
+
await page.locator(selector).first.wait_for(state="visible", timeout=TIMEOUT)
|
|
57
|
+
return [element for element in await page.locator(selector).all() if await element.is_visible()]
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
async def _dom_check(page: Page, scenario: str, role: str, rule: Rule) -> CheckResult:
|
|
61
|
+
try:
|
|
62
|
+
elements = await _visible(page, rule.dom_selector)
|
|
63
|
+
if elements:
|
|
64
|
+
texts = [await element.inner_text(timeout=TIMEOUT) for element in elements]
|
|
65
|
+
return check_dom_text("\n".join(texts), rule.check_config(), role, scenario)
|
|
66
|
+
except Error:
|
|
67
|
+
pass
|
|
68
|
+
return _unavailable("structured_dom", scenario, role, rule, "Selected DOM elements could not be inspected")
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
async def _visual_check(page: Page, scenario: str, role: str, rule: Rule) -> CheckResult:
|
|
72
|
+
results = []
|
|
73
|
+
try:
|
|
74
|
+
for element in await _visible(page, rule.visual_selector):
|
|
75
|
+
png = await element.screenshot(type="png", timeout=TIMEOUT)
|
|
76
|
+
ocr_text = await asyncio.to_thread(ocr_from_png_bytes, png)
|
|
77
|
+
if ocr_text:
|
|
78
|
+
results.append(check_visual_region(ocr_text, rule.check_config(), role, scenario))
|
|
79
|
+
else:
|
|
80
|
+
results.append(_unavailable("visual", scenario, role, rule, "OCR could not read the selected region"))
|
|
81
|
+
except Error:
|
|
82
|
+
results.append(_unavailable("visual", scenario, role, rule, "Selected region could not be captured"))
|
|
83
|
+
for status in ("fail", "inconclusive", "pass"):
|
|
84
|
+
for result in results:
|
|
85
|
+
if result.status == status:
|
|
86
|
+
return result
|
|
87
|
+
return _unavailable("visual", scenario, role, rule, "Selected visual region could not be inspected")
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
async def _scenario(
|
|
91
|
+
context: BrowserContext, contract: Contract, scenario: Scenario, role: str,
|
|
92
|
+
rules: tuple[Rule, ...],
|
|
93
|
+
) -> list[CheckResult]:
|
|
94
|
+
page = await context.new_page()
|
|
95
|
+
try:
|
|
96
|
+
try:
|
|
97
|
+
response = await page.goto(
|
|
98
|
+
contract.origin + scenario.page_path, wait_until="domcontentloaded", timeout=TIMEOUT
|
|
99
|
+
)
|
|
100
|
+
if response is None or not response.ok:
|
|
101
|
+
raise ValueError("Scenario page unavailable")
|
|
102
|
+
identity = await _read_json(page, contract.roles[role].identity_path)
|
|
103
|
+
if not isinstance(identity, dict) or identity.get("role") != role:
|
|
104
|
+
raise ValueError("Scenario identity mismatch")
|
|
105
|
+
except (Error, ValueError):
|
|
106
|
+
return [
|
|
107
|
+
_unavailable(check, scenario.id, role, rule, "Scenario or role identity could not be verified")
|
|
108
|
+
for rule in rules for check in CHECKS
|
|
109
|
+
]
|
|
110
|
+
results = []
|
|
111
|
+
for rule in rules:
|
|
112
|
+
results.extend((
|
|
113
|
+
await _api_check(page, scenario.api_path, scenario.id, role, rule),
|
|
114
|
+
await _dom_check(page, scenario.id, role, rule),
|
|
115
|
+
await _visual_check(page, scenario.id, role, rule),
|
|
116
|
+
))
|
|
117
|
+
return results
|
|
118
|
+
finally:
|
|
119
|
+
await page.close()
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
async def _run_browser(browser: Browser, contract: Contract, secrets: dict[str, str | None]) -> list[CheckResult]:
|
|
123
|
+
results = []
|
|
124
|
+
for role, session in contract.roles.items():
|
|
125
|
+
context = await browser.new_context(service_workers="block", accept_downloads=False, device_scale_factor=2)
|
|
126
|
+
try:
|
|
127
|
+
await configure(context, contract.origin, session, secrets[role])
|
|
128
|
+
rules = tuple(rule for rule in contract.rules if role in rule.roles)
|
|
129
|
+
for scenario in contract.scenarios:
|
|
130
|
+
LOGGER.info("Checking role=%s scenario=%s fields=%d", role, scenario.id, len(rules))
|
|
131
|
+
results.extend(await _scenario(context, contract, scenario, role, rules))
|
|
132
|
+
finally:
|
|
133
|
+
await context.close()
|
|
134
|
+
return results
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
async def run(contract: Contract) -> list[CheckResult]:
|
|
138
|
+
secrets = {role: secret_for(session) for role, session in contract.roles.items()}
|
|
139
|
+
return await run_with_role_secrets(contract, secrets)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
async def run_with_role_secrets(
|
|
143
|
+
contract: Contract, secrets: dict[str, str | None],
|
|
144
|
+
) -> list[CheckResult]:
|
|
145
|
+
"""Run with credentials supplied by the CLI or the bundled test application."""
|
|
146
|
+
async with async_playwright() as playwright:
|
|
147
|
+
browser = await playwright.chromium.launch()
|
|
148
|
+
try:
|
|
149
|
+
return await _run_browser(browser, contract, secrets)
|
|
150
|
+
finally:
|
|
151
|
+
await browser.close()
|
vac/session.py
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""Role sessions use only credentials issued for the test environment."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
from playwright.async_api import BrowserContext, Error, Route, WebSocketRoute
|
|
6
|
+
|
|
7
|
+
from vac.contract import ContractError, Session
|
|
8
|
+
from urllib.parse import urlsplit
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def secret_for(session: Session) -> str | None:
|
|
12
|
+
if session.secret_env is None:
|
|
13
|
+
return None
|
|
14
|
+
value = os.environ.get(session.secret_env, "")
|
|
15
|
+
if not value or any(ord(character) < 33 or ord(character) > 126 for character in value):
|
|
16
|
+
raise ContractError(f"Missing or invalid test credential in {session.secret_env}")
|
|
17
|
+
if session.cookie_name and any(character in value for character in ";,"):
|
|
18
|
+
raise ContractError(f"Invalid test cookie value in {session.secret_env}")
|
|
19
|
+
return value
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
async def configure(context: BrowserContext, origin: str, session: Session, secret: str | None) -> None:
|
|
23
|
+
"""Scope browser requests and credentials to one explicitly configured origin."""
|
|
24
|
+
if session.cookie_name:
|
|
25
|
+
await context.add_cookies([{
|
|
26
|
+
"name": session.cookie_name,
|
|
27
|
+
"value": secret,
|
|
28
|
+
"url": origin,
|
|
29
|
+
"httpOnly": True,
|
|
30
|
+
"sameSite": "Strict",
|
|
31
|
+
}])
|
|
32
|
+
|
|
33
|
+
async def send(route: Route) -> None:
|
|
34
|
+
url = urlsplit(route.request.url)
|
|
35
|
+
expected = urlsplit(origin)
|
|
36
|
+
if (
|
|
37
|
+
url.scheme != expected.scheme or url.netloc != expected.netloc
|
|
38
|
+
or route.request.method not in {"GET", "HEAD"}
|
|
39
|
+
):
|
|
40
|
+
await route.abort()
|
|
41
|
+
return
|
|
42
|
+
headers = await route.request.all_headers()
|
|
43
|
+
if session.mode == "bearer":
|
|
44
|
+
headers["authorization"] = f"Bearer {secret}"
|
|
45
|
+
try:
|
|
46
|
+
response = await route.fetch(headers=headers, max_redirects=0, timeout=10_000)
|
|
47
|
+
except Error:
|
|
48
|
+
await route.abort()
|
|
49
|
+
return
|
|
50
|
+
try:
|
|
51
|
+
if 300 <= response.status < 400:
|
|
52
|
+
# Chromium may follow redirects without calling the same route again.
|
|
53
|
+
await route.fulfill(status=403, body="Redirects are disabled in VAC test sessions")
|
|
54
|
+
else:
|
|
55
|
+
await route.fulfill(response=response)
|
|
56
|
+
finally:
|
|
57
|
+
await response.dispose()
|
|
58
|
+
|
|
59
|
+
async def close_socket(socket: WebSocketRoute) -> None:
|
|
60
|
+
await socket.close()
|
|
61
|
+
|
|
62
|
+
await context.route("**/*", send)
|
|
63
|
+
await context.route_web_socket("**/*", close_socket)
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: visual-access-contract
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: CI checks for role-specific visibility of synthetic data
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
Requires-Python: >=3.12
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: playwright==1.62.0
|
|
10
|
+
Requires-Dist: PyYAML==6.0.3
|
|
11
|
+
Provides-Extra: integration
|
|
12
|
+
Requires-Dist: fastapi==0.115.12; extra == "integration"
|
|
13
|
+
Requires-Dist: uvicorn==0.34.2; extra == "integration"
|
|
14
|
+
Dynamic: license-file
|
|
15
|
+
|
|
16
|
+
# Visual Access Contract
|
|
17
|
+
|
|
18
|
+
[](https://github.com/Anne07-Ai/visual-access-contract/actions/workflows/contract-validation.yml)
|
|
19
|
+
[](LICENSE)
|
|
20
|
+
[](pyproject.toml)
|
|
21
|
+
|
|
22
|
+
Visual Access Contract checks a versioned, role-specific masking rule against selected API responses, visible DOM text, and rendered pixels in CI. In our four-case synthetic experiment, OCR caught a canvas disclosure that the selected API and DOM checks missed, while API inspection caught a disclosure that never appeared on screen.
|
|
23
|
+
|
|
24
|
+
**Status** · Private engineering prototype for AppSec and QA teams. The current baseline covers one role, one field, and four synthetic scenarios. It uses a local fixture server and runs in reporting mode. The fixture results establish coverage for these scenarios. Coverage on customer applications and OCR accuracy across layouts still need validation.
|
|
25
|
+
|
|
26
|
+
## Install from PyPI
|
|
27
|
+
|
|
28
|
+
After the first PyPI publication, install VAC with Python 3.12 or newer in a virtual environment. Install Tesseract with your system package manager.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install visual-access-contract
|
|
32
|
+
python -m playwright install chromium
|
|
33
|
+
vac check --contract contract.yaml
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Use a schema 1.0 contract for `vac check`. See [Getting started](docs/getting-started.md) for an example.
|
|
37
|
+
|
|
38
|
+
## Try it in 60 seconds
|
|
39
|
+
|
|
40
|
+
After installing Python 3.12 or later, run these three lines on Ubuntu from a terminal with access to the repository:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
git clone https://github.com/Anne07-Ai/visual-access-contract.git && cd visual-access-contract
|
|
44
|
+
python -m venv .venv && source .venv/bin/activate && sudo apt-get install -y tesseract-ocr && python -m pip install -e . && python -m playwright install --with-deps chromium
|
|
45
|
+
python -m vac demo
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The demo starts and stops its own loopback fixture. It prints the selected check results and writes `vac-demo-report.html`, `vac-demo-report.sarif`, and `vac-demo-report.json` in the current directory. The synthetic demo has an expected API finding for support and an expected OCR finding for the viewer. Open the HTML file locally to view the role and field matrix alongside the redacted OCR match.
|
|
49
|
+
|
|
50
|
+
## How it works
|
|
51
|
+
|
|
52
|
+
1. **Policy** · A versioned contract specifies the field and the visibility allowed for a role.
|
|
53
|
+
2. **Structured checks** · The runner inspects one fixture API response and visible text in the fixture's display cards.
|
|
54
|
+
3. **Visual check** · Tesseract reads the fixture canvas or viewport image. The runner sends screenshots to OCR in memory and writes redacted text evidence for visual failures.
|
|
55
|
+
4. **Reporting** · Console and JSON output show individual check results, distinct flagged cases, and cases flagged by one group while the other group passed.
|
|
56
|
+
|
|
57
|
+
## Fixture coverage
|
|
58
|
+
|
|
59
|
+
| Case | API response | Visible DOM | OCR | Expected finding |
|
|
60
|
+
|---|---|---|---|---|
|
|
61
|
+
| A | Masked | Masked | Masked | All checks pass |
|
|
62
|
+
| B | Full value | Masked | Masked | API check flags the full value |
|
|
63
|
+
| C | Masked | Masked | Full value on canvas | OCR flags the value |
|
|
64
|
+
| D | Full value | Full value | Full value | API, DOM, and OCR checks flag the value |
|
|
65
|
+
|
|
66
|
+
In Case C, the HTML includes the synthetic chart label as character codes. The browser reconstructs the label and paints it on the canvas. The selected JSON response and visible DOM contain only the masked value. The full value is absent as literal text in the HTML and remains recoverable from the page script. The fixture measures what VAC's selected checks observe. Case D uses ordinary DOM text, which OCR reads from the viewport image.
|
|
67
|
+
|
|
68
|
+
## Run the baseline
|
|
69
|
+
|
|
70
|
+
Use Python 3.12, Tesseract OCR, and Playwright Chromium. On Ubuntu, install Tesseract with `sudo apt-get install tesseract-ocr`.
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
python -m venv .venv
|
|
74
|
+
source .venv/bin/activate
|
|
75
|
+
python -m pip install -e .
|
|
76
|
+
python -m playwright install chromium
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Start the fixture server in one terminal with `python -I fixtures/fixture_server.py`. In a second terminal with the same environment activated, run:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
python -I run_experiment.py --verify-fixtures
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The JSON report is written to `evidence/experiment_report.json`. The flag returns a failure if an expected fixture result differs or OCR is inconclusive. GitHub Actions uses this flag to verify the prototype. Running without it produces a reporting-only result.
|
|
86
|
+
|
|
87
|
+
### Output and exit codes
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
python -m vac check --contract examples/contract.yaml --json-stdout --quiet | jq .
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
JSON is written to `vac-results.json` by default. `--json-stdout` sends the same report to stdout without writing a JSON file. SARIF and optional HTML output still go to files. `--quiet` prints one summary with the exit code to stderr, keeping stdout available for JSON.
|
|
94
|
+
|
|
95
|
+
| Code | Meaning |
|
|
96
|
+
| --- | --- |
|
|
97
|
+
| `0` | Checks passed with `--enforce`. In reporting mode, the run completed and outcomes are in the report. |
|
|
98
|
+
| `1` | With `--enforce`, at least one selected check found a violation or was inconclusive. |
|
|
99
|
+
| `2` | Contract, session, or run setup error. |
|
|
100
|
+
|
|
101
|
+
## Adoption guides
|
|
102
|
+
|
|
103
|
+
- [Getting started](docs/getting-started.md)
|
|
104
|
+
- [Writing contracts](docs/writing-contracts.md)
|
|
105
|
+
- [CI integration](docs/ci-integration.md)
|
|
106
|
+
- [Launch post](docs/blog/launch.md)
|
|
107
|
+
|
|
108
|
+
## Design-partner evaluation
|
|
109
|
+
|
|
110
|
+
The next milestone is a comparison with existing browser assertions on a broader synthetic evaluation set. Measure unique detections, false alerts, the fraction of regions OCR can verify, and time to locate the issue from the report. An approved staging pilot should follow once those results and evidence handling have been reviewed.
|
|
111
|
+
|
|
112
|
+
## Run a multi-field, multi-role contract
|
|
113
|
+
|
|
114
|
+
The version 1 CLI takes an explicit YAML contract. See [the synthetic example](examples/contract.yaml) for two fields and three roles. For each configured role and scenario, VAC opens an isolated browser session, verifies the role on a caller-supplied identity endpoint, and reports the three checks independently per field.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
python -I vac_cli.py --contract examples/contract.yaml --report vac-results.json --sarif vac-results.sarif --html
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Use `--html` for the default `vac-results.html` file, or `--html path/to/report.html` for a custom path. Configure the origin, scenario paths, test role credentials, and field locators for your test application. The example targets the optional local mock app in `tests/session_app.py`. The implemented policy allows a full value or checks that a known synthetic numeric identifier is absent from the selected field where masking is required. A masked rule permits omission of the full value and does not validate exact mask formatting. An unavailable selected check is inconclusive. Use `--enforce` to fail CI on either a violation or an inconclusive check.
|
|
121
|
+
|
|
122
|
+
Authentication supports environment-backed bearer tokens and session cookies. The loopback-only SSO stub accepts a pre-issued synthetic session cookie. The identity endpoint must return `{"role": "<expected role>"}` for the current test session. Requests are limited to GET and HEAD on one configured origin, with cross-origin calls and redirects blocked. Keep credentials in CI secrets and use only synthetic records. Screenshots and inspected bodies stay in memory. Reports contain check metadata only.
|
|
123
|
+
|
|
124
|
+
### GitHub Action
|
|
125
|
+
|
|
126
|
+
On an Ubuntu runner, check out the application repository and start its synthetic test environment in earlier steps. Run VAC from that checkout using the following step. For private cross-repository use, the VAC repository must be available to the caller via GitHub Actions access settings.
|
|
127
|
+
|
|
128
|
+
```yaml
|
|
129
|
+
- name: Verify selected visibility checks
|
|
130
|
+
id: vac
|
|
131
|
+
uses: Anne07-Ai/visual-access-contract@v1
|
|
132
|
+
with:
|
|
133
|
+
contract: path/to/contract.yaml
|
|
134
|
+
enforce: "true"
|
|
135
|
+
env:
|
|
136
|
+
VAC_ADMIN_TOKEN: ${{ secrets.VAC_ADMIN_TOKEN }}
|
|
137
|
+
VAC_SUPPORT_COOKIE: ${{ secrets.VAC_SUPPORT_COOKIE }}
|
|
138
|
+
|
|
139
|
+
- name: Upload SARIF to GitHub code scanning
|
|
140
|
+
if: ${{ !cancelled() && hashFiles(steps.vac.outputs.sarif) != '' }}
|
|
141
|
+
uses: github/codeql-action/upload-sarif@v4
|
|
142
|
+
with:
|
|
143
|
+
sarif_file: ${{ steps.vac.outputs.sarif }}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
The optional upload step requires GitHub code scanning and `security-events: write` in the caller job. SARIF includes confirmed findings with their role, scenario and check type. The JSON report also records passes and inconclusive checks.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
checks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
checks/structured_check.py,sha256=m9pEO8eI8gv2fyvdkfzxvKBwbkerqgk4IRymsqpfgIc,5187
|
|
3
|
+
checks/visual_check.py,sha256=OdLMQHhBRsITRjU39Uf68H0vpaqwSa5uD9MxnARQARo,5007
|
|
4
|
+
evidence/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
evidence/reporter.py,sha256=SP8b6RvV8N36xRdS3rjxEzKqDJP39_f2jiYt0kEjHds,5425
|
|
6
|
+
vac/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
vac/__main__.py,sha256=nZtOo7J54cROvGPbQq4ahvGQH-9lk6XdXiz4UQlaspA,1260
|
|
8
|
+
vac/cli.py,sha256=W1PxbqBn_lbYh_Y68yIDMB1FLxIcvyxdxBLKhDW3rAc,4270
|
|
9
|
+
vac/contract.py,sha256=vZ-I5WgIZQy8-8w1HoZ8QquBfL-wPNxPWoOzYCTO4-w,10800
|
|
10
|
+
vac/demo-contract.yaml,sha256=tRrKwEvXYQCvei-aMg6Mmh70O42XE66MkP4KF0IG5f8,1122
|
|
11
|
+
vac/demo.py,sha256=675q8IzZYbje9yICa--wtEtH7bSvu8gdYuEoAAoXyvc,2279
|
|
12
|
+
vac/demo_fixture.py,sha256=abz3mPqATtXJQ5v7Iqge86ZMJccwxNAJkQcYn9WNHnA,3611
|
|
13
|
+
vac/html_report.py,sha256=D9fT5N3jgQu50DqzS8vKUc1329oD0Cg-ATmJnRjNblk,3957
|
|
14
|
+
vac/output.py,sha256=kBi9rSWxgwvJc47EolP-zYd41BHbkWkIQVJ0_j6wKeo,2723
|
|
15
|
+
vac/runner.py,sha256=qEI3JrzkGJGhEY9fD4w_lR148Sp-gIl0r6b79Hu9jC4,6363
|
|
16
|
+
vac/session.py,sha256=hRXU4ok0GPS5bKIHqs-_xmB9DR1p7wTFhr6ZxNQJ2Do,2406
|
|
17
|
+
visual_access_contract-0.2.1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
18
|
+
visual_access_contract-0.2.1.dist-info/METADATA,sha256=2OvK-WRlIBj3pKajzzQsGE0LGhZwuRlYf3e3SfhHTCs,8932
|
|
19
|
+
visual_access_contract-0.2.1.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
20
|
+
visual_access_contract-0.2.1.dist-info/entry_points.txt,sha256=hkKNcU__XhmCdeHsdUmb5JI_ReQYbbC-BV_Yto_NBlQ,42
|
|
21
|
+
visual_access_contract-0.2.1.dist-info/top_level.txt,sha256=RBZ-oChbix4UNypeayi6J2Yw9ncaXAlY8zB8Ka7u-R8,20
|
|
22
|
+
visual_access_contract-0.2.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|