@@ -1681,11 +1681,19 @@ async def test_public_report_redacts_secrets_and_absolute_personal_paths(tmp_pat
16811681 "api_key" : "plain-api-key" ,
16821682 "nested" : {
16831683 "access_token" : "plain-token" ,
1684+ "accessToken" : "plain-camel-access-token" ,
1685+ "authToken" : "plain-camel-auth-token" ,
1686+ "bearerToken" : "plain-camel-bearer-token" ,
1687+ "idToken" : "plain-camel-id-token" ,
1688+ "githubToken" : "plain-camel-github-token" ,
1689+ "passwordValue" : "plain-camel-password-value" ,
16841690 "credentials" : {
16851691 "password" : "plain-password"
16861692 },
16871693 "github_token" : "plain-github-token" ,
16881694 "private_key" : "plain-private-key" ,
1695+ "max_tokens" : 2048 ,
1696+ "token_budget" : 4096 ,
16891697 "cache_path" : str (tmp_path / "private-cache" ),
16901698 },
16911699 }
@@ -1700,6 +1708,14 @@ async def test_public_report_redacts_secrets_and_absolute_personal_paths(tmp_pat
17001708 assert "plain-password" not in payload
17011709 assert "plain-github-token" not in payload
17021710 assert "plain-private-key" not in payload
1711+ assert "plain-camel-access-token" not in payload
1712+ assert "plain-camel-auth-token" not in payload
1713+ assert "plain-camel-bearer-token" not in payload
1714+ assert "plain-camel-id-token" not in payload
1715+ assert "plain-camel-github-token" not in payload
1716+ assert "plain-camel-password-value" not in payload
1717+ assert report .audit ["config_snapshot" ]["nested" ]["max_tokens" ] == 2048
1718+ assert report .audit ["config_snapshot" ]["nested" ]["token_budget" ] == 4096
17031719 assert str (tmp_path .resolve ()) not in payload
17041720 assert report .run ["reproducibility_shell" ] == "powershell"
17051721 assert "$EXTERNAL" in report .run ["reproducibility_command" ]
@@ -1713,11 +1729,26 @@ async def test_public_report_redacts_secrets_and_absolute_personal_paths(tmp_pat
17131729 request .run_id ,
17141730 "config.snapshot.json" ,
17151731 ).read_text (encoding = "utf-8" )
1716- assert "plain-api-key" not in persisted + config_snapshot
1717- assert "plain-token" not in persisted + config_snapshot
1718- assert "plain-password" not in persisted + config_snapshot
1719- assert "plain-github-token" not in persisted + config_snapshot
1720- assert "plain-private-key" not in persisted + config_snapshot
1732+ final_run_dir = Path (request .output_dir ) / "runs" / request .run_id
1733+ persisted_bytes = persisted .encode ("utf-8" ) + persisted_markdown .encode ("utf-8" )
1734+ persisted_bytes += b"" .join (path .read_bytes () for path in final_run_dir .rglob ("*" ) if path .is_file ())
1735+ for secret in (
1736+ "plain-api-key" ,
1737+ "plain-token" ,
1738+ "plain-password" ,
1739+ "plain-github-token" ,
1740+ "plain-private-key" ,
1741+ "plain-camel-access-token" ,
1742+ "plain-camel-auth-token" ,
1743+ "plain-camel-bearer-token" ,
1744+ "plain-camel-id-token" ,
1745+ "plain-camel-github-token" ,
1746+ "plain-camel-password-value" ,
1747+ ):
1748+ assert secret .encode ("utf-8" ) not in persisted_bytes
1749+ redacted_snapshot = json .loads (config_snapshot )
1750+ assert redacted_snapshot ["nested" ]["max_tokens" ] == 2048
1751+ assert redacted_snapshot ["nested" ]["token_budget" ] == 4096
17211752 assert "```powershell" in persisted_markdown
17221753 assert str (tmp_path .resolve ()) not in persisted_markdown
17231754 assert hashlib .sha256 (
0 commit comments