Commit 8f4348e
fix: consolidate contributor runtime-security hardening (#152)
* Redact persisted scan failure credentials
* fix: bound login and skill child shutdown
* fix: bound authentication and skill output
* fix: bound configured plugin traversal
* fix: bound cost session events
* fix: fail the scan on every turn.failed payload
A failed turn was only honored when its error payload was an object with a
string message. Every other shape fell through the event loop, and because a
turn.completed had already been observed the scan was returned to the caller
as successful and recorded with complete-scan.
Treat any turn.failed as terminal. Only error.message is reused, because that
is the single shape the previous code already surfaced; no other shape is
forwarded or stringified, since this message reaches fail-scan --message and
is stored in scans.failure_message without redaction.
* fix: keep scan cleanup failures from replacing the scan result
The scan finally block awaited knowledge-base cleanup, target-paths removal, and
the credential home release without guarding any of them. A rejection in a
finally block replaces the pending exception, so a cleanup failure discarded the
outcome the try and catch blocks had already produced and the caller was handed
an unrelated filesystem error instead of the reason the scan failed. The catch
block had already recorded the real message through fail-scan, so the persisted
scan history and the reported error disagreed.
Removing the temporary inputs is best effort and is now reported through
onWarning instead of deciding the result. Releasing the credential home lock is
not: it only marks itself done once the lock directory is gone, so a failed
release leaves an owner.json naming a live process that stale-lock recovery will
not reclaim. That failure still propagates, and is downgraded to a warning only
when the scan already failed and its error is the one worth keeping.
The failed-scan marker is recorded on entry to the catch block because
requireOpen and throwIfAborted raise a different error for the same failed scan,
the release keeps its own finally so reporting the earlier failures cannot skip
it, and the warning formatter is total so no hostile reason can throw in place of
the result.
* fix: prioritize active preflight config
* fix: make bounded authentication shutdown deterministic
Co-authored-by: mangeshraut712 <mbr63@drexel.edu>
* test: restrict POSIX process signal propagation to supported platforms
* fix: close runtime credential and subprocess review gaps
* fix: report local scan failures without connectivity advice
classifyConnectionFailure matches bare words anywhere in a message, and
the unauthorized, forbidden and rate-limited branches of
scanFailureMessage replace the message entirely with fixed advice. A
local failure whose text merely contained one of those words was
therefore reported as a credential problem, and its own text reached
neither stderr nor the JSON error field.
The reported trigger is "permission denied", the standard strerror for
EACCES: a read-only TMPDIR surfaced as "The stored ChatGPT credentials
cannot access the configured model."
Skip classification for failures that cannot originate from the model
transport -- InvalidTargetError, OutputDirectoryError,
ConfigurationError, PluginPythonUnavailableError, and filesystem syscall
errno codes -- so they keep their own message. Network errno codes are
deliberately excluded from that set because they are genuine transport
failures.
Advice still replaces the underlying text for real transport failures.
Upstream authentication and authorization errors can name the
organization or project, and cli-authentication.test.ts pins that they
must not reach stderr.
Fixes #36
* fix: retain credential redaction for local scan failures
* fix: harden credential redaction and authentication boundaries
* fix: exclude unrelated delegated cost sessions safely
* fix: keep credential homes private under trusted ancestry
Reject non-sticky or untrusted parents for durable auth state, re-check
on every credential-home use path, harden auth.json, and pin identity
for the lock session so shared-volume rename races cannot steal auth.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: preserve safe credential login and shared ancestry contracts
* test: use private credential homes for authentication fixtures
* fix: redact PEM credentials and revalidate Windows home ACLs
* test: synchronously flush synthetic ChatGPT login prompts
* fix: atomically publish ambient auth credentials
* fix: redact JSON-quoted credentials before persistent failures
* fix: redact recursively escaped credential strings
* fix: close credential redaction and home identity races
* fix: seal credential locking and redact custom authorization schemes
* fix: bound login instructions and redact incomplete credentials
* fix: preserve padded authorization credentials during redaction
* fix: redact camel-case credential fields before persistence
* fix: settle terminated skill processes and portable credential imports
* fix: redact truncated private-key diagnostics completely
* fix: redact key-value custom authorization credentials
---------
Co-authored-by: Matthew Bright <matthew.bright@hotmail.com>
Co-authored-by: GautamSharma99 <gautamsharma99067@gmail.com>
Co-authored-by: Hai Duong <haiduong.nguyen2712@gmail.com>
Co-authored-by: mangeshraut712 <mbr63@drexel.edu>
Co-authored-by: mldangelo <michael.l.dangelo@gmail.com>
Co-authored-by: batmanknows <122247678+batmnnn@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Ian Webster <ianw@openai.com>1 parent 908bdb7 commit 8f4348e
17 files changed
Lines changed: 2618 additions & 320 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
384 | 386 | | |
385 | 387 | | |
386 | 388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
| 315 | + | |
314 | 316 | | |
315 | 317 | | |
316 | 318 | | |
| |||
397 | 399 | | |
398 | 400 | | |
399 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
400 | 410 | | |
401 | 411 | | |
402 | 412 | | |
| |||
533 | 543 | | |
534 | 544 | | |
535 | 545 | | |
536 | | - | |
537 | | - | |
538 | 546 | | |
539 | 547 | | |
540 | 548 | | |
| |||
562 | 570 | | |
563 | 571 | | |
564 | 572 | | |
| 573 | + | |
565 | 574 | | |
566 | 575 | | |
567 | 576 | | |
| |||
832 | 841 | | |
833 | 842 | | |
834 | 843 | | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
835 | 847 | | |
836 | 848 | | |
837 | 849 | | |
| |||
843 | 855 | | |
844 | 856 | | |
845 | 857 | | |
| 858 | + | |
| 859 | + | |
846 | 860 | | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
| 861 | + | |
851 | 862 | | |
852 | 863 | | |
853 | 864 | | |
| |||
860 | 871 | | |
861 | 872 | | |
862 | 873 | | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
863 | 879 | | |
864 | | - | |
| 880 | + | |
865 | 881 | | |
866 | 882 | | |
867 | | - | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
868 | 890 | | |
869 | | - | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
870 | 905 | | |
871 | 906 | | |
872 | 907 | | |
| |||
1319 | 1354 | | |
1320 | 1355 | | |
1321 | 1356 | | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
1322 | 1379 | | |
1323 | 1380 | | |
1324 | 1381 | | |
| |||
1395 | 1452 | | |
1396 | 1453 | | |
1397 | 1454 | | |
1398 | | - | |
1399 | | - | |
1400 | | - | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
| 1455 | + | |
| 1456 | + | |
1404 | 1457 | | |
1405 | 1458 | | |
1406 | 1459 | | |
| |||
1556 | 1609 | | |
1557 | 1610 | | |
1558 | 1611 | | |
| 1612 | + | |
1559 | 1613 | | |
1560 | 1614 | | |
1561 | 1615 | | |
| |||
1578 | 1632 | | |
1579 | 1633 | | |
1580 | 1634 | | |
1581 | | - | |
| 1635 | + | |
1582 | 1636 | | |
1583 | 1637 | | |
1584 | 1638 | | |
| |||
1758 | 1812 | | |
1759 | 1813 | | |
1760 | 1814 | | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
1761 | 1830 | | |
1762 | 1831 | | |
1763 | 1832 | | |
| |||
1833 | 1902 | | |
1834 | 1903 | | |
1835 | 1904 | | |
1836 | | - | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
1837 | 1909 | | |
1838 | 1910 | | |
1839 | 1911 | | |
| |||
1903 | 1975 | | |
1904 | 1976 | | |
1905 | 1977 | | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
1906 | 1991 | | |
1907 | 1992 | | |
1908 | | - | |
1909 | | - | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
1910 | 1998 | | |
1911 | 1999 | | |
1912 | 2000 | | |
1913 | 2001 | | |
1914 | | - | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
1915 | 2007 | | |
1916 | 2008 | | |
1917 | | - | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
1918 | 2013 | | |
1919 | 2014 | | |
1920 | 2015 | | |
| |||
1927 | 2022 | | |
1928 | 2023 | | |
1929 | 2024 | | |
1930 | | - | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
1931 | 2045 | | |
1932 | 2046 | | |
1933 | 2047 | | |
1934 | 2048 | | |
1935 | 2049 | | |
1936 | 2050 | | |
| 2051 | + | |
| 2052 | + | |
1937 | 2053 | | |
1938 | 2054 | | |
1939 | 2055 | | |
| |||
0 commit comments