Multi-tier framework for evaluating AI agent skills and plugins with quality gates, security scanning, harness compatibility checks, semantic overlap detection, synthetic evaluation dataset generation, and live agent evaluation that measures how skills affect agent behavior. Ships reusable CI templates that bring every check to any repository.
Python agent-evaluationagent-pluginsagent-securityagent-skillsagentic-aibenchmarkci-templatesclaude-codecodexevaluateevaluationharnesspluginplugin-evaluationsecurity-scannerskill-evalskill-evaluationskill-evaluatorskill-gap-analysisskills
fix(tier1): stop reporting link-local addresses as PII IPs (#555)
Narendran Raghavan434df3683b4a
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 822f2a7c..35a33ab5 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -703,6 +703,14 @@ All notable changes to SkillEvaluator are documented in this file.evidence; with no other in-range count for that attempt the agent isrefused as `no_progress_evidence`, where result collection used to stopwith `browser-unsafe JSON integer` and write no `result.json` or report.+- The PII scan no longer reports link-local `169.254.x.x` addresses, such as the+ cloud instance metadata endpoint `169.254.169.254` and the ECS credentials+ endpoint `169.254.170.2`, as non-RFC1918 IP addresses; its advice to use a+ private IP cannot apply to them. Other addresses outside the excluded ranges,+ including `169.25.x.x` and `169.255.x.x`, are still reported. A+ `--pii-waivers` entry that accepted such an address now matches no finding,+ so it is reported as a LOW `stale-pii-waiver` instead of an INFO+ `applied-pii-waiver` and can be removed.- A native Codex `exec` wrapper that calls the freeform `apply_patch` tool withthe patch as a bare string is decoded instead of being discarded. The boundeddiff --git a/docs/tier1-validation.mdx b/docs/tier1-validation.mdxindex 30e25c48..ba8d92bd 100644--- a/docs/tier1-validation.mdx+++ b/docs/tier1-validation.mdx@@ -404,7 +404,7 @@ For `validate`, the default set is `schema`, `version`, `security`, `pii`, `lice| --- | --- | --- || Personal information | Personal paths, non-placeholder email addresses, phone numbers, SSNs, GPS coordinates, MAC addresses | Personal macOS/Windows paths are flagged; SSNs are CRITICAL || Credentials and secrets | Database connection strings, hardcoded API keys, cloud keys, GitHub tokens, private keys, JWTs, webhook URLs | Most credential findings are CRITICAL |- | Network and financial | Public IPs, credit-card numbers, cryptocurrency wallet addresses | Private RFC1918 addresses are excluded |+ | Network and financial | Public IPs, credit-card numbers, cryptocurrency wallet addresses | Private RFC1918, loopback (`127.x`), link-local (`169.254.x.x`, including cloud metadata endpoints such as `169.254.169.254`), and `0.x` (including the `0.0.0.0` placeholder) addresses are excluded |Numeric values are judged by their context as well as their shape. A card-shaped number is not reported when a timestamp or digest label (`timestamp_microseconds:`, `event_timestamp:`, `epoch`, `epoch_us`, `unix_time`, `sha256:`, `checksum=`) directly precedes it or when it sits inside a longer ASCII token, such as a hex digest or an identifier like `id_1707938736269577` where an underscore joins it to a letter or digit (unless a payment word such as `card`, `cc`, or `pan` is part of that identifier, as in `card_4532015112830366`). A card in Markdown underscore emphasis (`_4532015112830366_`), after a string escape such as `\n` or `\t` or a percent-encoded byte such as `%3D`, or written directly next to Chinese, Japanese, Korean, or other non-ASCII letters (including the Turkish dotless `ı`) is still reported. Widely published test card numbers (`4111111111111111`, `4242424242424242`, `5555555555554444`, and similar) are excepted however their digits are grouped, without hiding a different card number on the same line. An international phone candidate that starts inside a scientific-notation value such as `1.000000e+00` is ignored. A GPS-shaped decimal pair is reported only with a geospatial cue on its line, on one of the two lines before it, or in the file name. Strong cues are GPS, latitude/longitude, lat/lng, `latlong`/`lonlat` keys, WGS 84, a `geo:` URI, a Google, Apple, OpenStreetMap, or Bing map link, and a GeoJSON geometry, `Feature`, or collection `"type"` or `"geometry"` member. Soft cues are location, office, address, degrees, and `°`. Cue words count in their plural forms, with a numeric suffix, and inside snake_case or camelCase keys and file names (`store_locations:`, `latlngs`, `lat1`, `homeLocation`, `gpsCoords`, `locations.json`). The GeoJSON `type` and `geometry` keys count double-quoted, single-quoted, or bare, so JSON, Python dicts, JS objects, and YAML all carry the cue; a bare type value must use GeoJSON's spelling (`Point`, `MultiPolygon`). Every position inside a GeoJSON geometry's `coordinates` array is cued, however deeply its rings are nested, when the geometry is written with braces (JSON, a Python dict, or a JS object); block-style YAML geometry is cued only through the two-line window. Technical labels outweigh soft cues but not strong ones: `waypoint`, `quaternion`, `pose`, `vector`, `calibration`, `roi`, and `scale` count only on the pair's own line and only before the pair (so `Location: 37.774929, -122.419416 (map scale 1:5000)` is still reported), while `<pixel|camera|world|...> coordinates` also counts on the two lines before it and in the file name. Pairs without a cue are not reported, for example `coordinates: 37.7749, -122.4194`, `Meet me at 37.7749, -122.4194`, or `home: 37.774929, -122.419416`.diff --git a/src/skillevaluator/config/pii_patterns.yaml b/src/skillevaluator/config/pii_patterns.yamlindex 9258cac9..7c73310c 100644--- a/src/skillevaluator/config/pii_patterns.yaml+++ b/src/skillevaluator/config/pii_patterns.yaml@@ -110,9 +110,9 @@ ssn:description: Social Security Numbersuggestion: "Remove SSN immediately - use placeholder like XXX-XX-XXXX if needed"-# IP addresses (excluding RFC1918 private ranges and localhost)+# IP addresses (excluding RFC1918 private ranges, localhost, link-local, and 0.x)ip_addresses:- - pattern: '\b(?!10\.|172\.1[6-9]\.|172\.2[0-9]\.|172\.3[01]\.|192\.168\.|127\.|0\.)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b'+ - pattern: '\b(?!10\.|172\.1[6-9]\.|172\.2[0-9]\.|172\.3[01]\.|192\.168\.|127\.|169\.254\.|0\.)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b'severity: mediumdescription: Non-RFC1918 IP addresssuggestion: "Use private IP (10.x.x.x, 192.168.x.x) or placeholder like 0.0.0.0"diff --git a/tests/validators/test_security.py b/tests/validators/test_security.pyindex 0fb18493..536f57f9 100644--- a/tests/validators/test_security.py+++ b/tests/validators/test_security.py@@ -8697,6 +8697,48 @@ class TestSpdxAndIpFalsePositiveHardening:if finding.check_name == "ip_addresses"] == ["8.8.8.8"]+ @pytest.mark.parametrize(+ "line",+ [+ "Block requests to the instance metadata endpoint http://169.254.169.254/latest/meta-data/\n",+ "ECS task credentials are served from http://169.254.170.2/v2/credentials\n",+ "The interface fell back to the link-local address 169.254.1.1\n",+ ],+ )+ def test_link_local_addresses_are_not_pii(self, tmp_path: Path, line: str) -> None:+ skill_dir = tmp_path / "link-local-skill"+ skill_dir.mkdir()+ (skill_dir / "SKILL.md").write_text(line, encoding="utf-8")++ result = SecurityValidator().validate_pii_only(skill_dir)++ assert not any(finding.check_name == "ip_addresses" for finding in result.findings)++ @pytest.mark.parametrize("address", ["8.8.8.8", "169.25.1.1", "169.255.1.1"])+ def test_addresses_outside_the_link_local_range_remain_pii(self, tmp_path: Path, address: str) -> None:+ skill_dir = tmp_path / "near-link-local-skill"+ skill_dir.mkdir()+ (skill_dir / "SKILL.md").write_text(f"Upstream resolver: {address}\n", encoding="utf-8")++ result = SecurityValidator().validate_pii_only(skill_dir)++ matched = [+ finding.metadata.get("matched_value") for finding in result.findings if finding.check_name == "ip_addresses"+ ]+ assert matched == [address]++ def test_link_local_address_does_not_hide_a_public_ip_on_its_line(self, tmp_path: Path) -> None:+ skill_dir = tmp_path / "link-local-and-public-ip-skill"+ skill_dir.mkdir()+ (skill_dir / "SKILL.md").write_text("Block 169.254.169.254; resolver 8.8.8.8\n", encoding="utf-8")++ result = SecurityValidator().validate_pii_only(skill_dir)++ matched = [+ finding.metadata.get("matched_value") for finding in result.findings if finding.check_name == "ip_addresses"+ ]+ assert matched == ["8.8.8.8"]+def _png_chunk(kind: bytes, data: bytes) -> bytes:"""Return one PNG chunk with its length and CRC."""