You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/explanation/threat_model_usage.rst
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -721,7 +721,7 @@ Asset Identification
721
721
- Process
722
722
- High / High / High
723
723
* - A-26: SVN Export (svn export)
724
-
- Runs ``svn export --non-interactive --force`` to check out SVN dependencies. The ``--ignore-externals`` flag is NOT passed. SVN repositories with ``svn:externals`` properties will trigger additional fetches from third-party SVN servers not declared in ``dfetch.yaml``. After export, ``SvnSubProject._fetch_externals()`` queries the externals list and records each one as a ``Dependency`` with ``source_type='svn-external'`` — mirroring the metadata tracking that git submodules receive. These fetches bypass dfetch's manifest controls: no integrity hash and no code review of the external URL (the URL comes from the upstream repository, not from ``dfetch.yaml``).
724
+
- Runs ``svn export --non-interactive --force`` to check out SVN dependencies. For ``svn+ssh://`` URLs the ``SVN_SSH`` environment variable is extended with ``-o BatchMode=yes`` so the SSH client does not prompt for a host-key confirmation (``_extend_env_for_non_interactive_mode()``, ``dfetch/vcs/svn.py``). The ``--ignore-externals`` flag is NOT passed. SVN repositories with ``svn:externals`` properties will trigger additional fetches from third-party SVN servers not declared in ``dfetch.yaml``. After export, ``SvnSubProject._fetch_externals()`` queries the externals list and records each one as a ``Dependency`` with ``source_type='svn-external'`` — mirroring the metadata tracking that git submodules receive. These fetches bypass dfetch's manifest controls: no integrity hash and no code review of the external URL (the URL comes from the upstream repository, not from ``dfetch.yaml``).
725
725
- Process
726
726
- High / High / High
727
727
* - A-27: Git Clone (git init / fetch / checkout)
@@ -1620,8 +1620,8 @@ Threats
1620
1620
- | **Sev:** 🟠H
1621
1621
|**Risk:** 🟠H
1622
1622
|**STRIDE:** T I
1623
-
|**Status:** Accept
1624
-
- dfetch accepts ``http://``, ``svn://``, and other non-TLS scheme URLs; HTTPS enforcement is the manifest author's responsibility. Accepted based on the **No HTTPS enforcement** assumption: HTTPS enforcement is the responsibility of the manifest author; dfetch accepts non-TLS scheme URLs as written and does not upgrade or reject them.
1623
+
|**Status:** Mitigate
1624
+
- C-009 emits a visible warning immediately before the VCS command when a plaintext scheme (``http://``, ``git://``, ``svn://``) is detected, with credentials redacted and ``https://`` / ``svn+ssh://`` recommended. Detection only — dfetch does not reject or upgrade plaintext URLs; scheme selection remains the manifest author's responsibility.
1625
1625
* - DFT-03
1626
1626
- Path traversal in archive or patch extraction
1627
1627
- A-26: SVN Export (svn export)
@@ -1660,8 +1660,8 @@ Threats
1660
1660
- | **Sev:** 🟠H
1661
1661
|**Risk:** 🟠H
1662
1662
|**STRIDE:** T I
1663
-
|**Status:** Accept
1664
-
- dfetch accepts ``http://``, ``svn://``, and other non-TLS scheme URLs; HTTPS enforcement is the manifest author's responsibility. Accepted based on the **No HTTPS enforcement** assumption: HTTPS enforcement is the responsibility of the manifest author; dfetch accepts non-TLS scheme URLs as written and does not upgrade or reject them.
1663
+
|**Status:** Mitigate
1664
+
- C-009 emits a visible warning immediately before the VCS command when a plaintext scheme (``http://``, ``git://``, ``svn://``) is detected, with credentials redacted and ``https://`` / ``svn+ssh://`` recommended. Detection only — dfetch does not reject or upgrade plaintext URLs; scheme selection remains the manifest author's responsibility.
1665
1665
1666
1666
1667
1667
Controls
@@ -1699,7 +1699,7 @@ Controls
1699
1699
* - C-006
1700
1700
- Non-interactive VCS
1701
1701
- DFT-06
1702
-
- ``GIT_TERMINAL_PROMPT=0``, ``BatchMode=yes`` for Git; ``--non-interactive`` for SVN. Credential prompts are suppressed to prevent interactive hijacking in CI. ``dfetch/vcs/git.py, dfetch/vcs/svn.py``
1702
+
- ``GIT_TERMINAL_PROMPT=0``, ``BatchMode=yes`` for Git; ``--non-interactive`` for SVN. For ``svn+ssh://`` connections, the ``SVN_SSH`` environment variable is extended with ``-o BatchMode=yes`` (via ``_extend_env_for_non_interactive_mode()`` in ``dfetch/vcs/svn.py``) to prevent the SSH client from prompting for a host-key confirmation and hanging the process. Credential prompts are suppressed to prevent interactive hijacking in CI. ``dfetch/vcs/git.py, dfetch/vcs/svn.py``
1703
1703
* - C-007
1704
1704
- Subprocess safety
1705
1705
- DFT-06
@@ -1708,6 +1708,10 @@ Controls
1708
1708
- Manifest input validation
1709
1709
- DFT-04, DFT-08
1710
1710
- StrictYAML schema with ``SAFE_STR = Regex(r"^[^\x00-\x1F\x7F-\x9F]*$")`` rejects control characters in all string fields. ``dfetch/manifest/schema.py``
1711
+
* - C-009
1712
+
- Plaintext transport detection
1713
+
- DFT-26
1714
+
- ``plaintext_warning()`` (``dfetch/manifest/project.py``) inspects the resolved remote URL immediately before each VCS command is issued (inside the ``check_for_update`` and ``update`` spinners in ``subproject.py``). If the scheme is ``http://``, ``git://``, or ``svn://``, a visible warning is emitted naming the redacted URL (credentials stripped from the userinfo component) and recommending ``https://`` or ``svn+ssh://``. Detection only — dfetch still proceeds with the plaintext connection; the control raises user awareness but does not enforce scheme selection. ``dfetch/manifest/project.py, dfetch/project/subproject.py``
0 commit comments