<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15605</bug_id>
          
          <creation_ts>2024-10-02 12:20:23 +0000</creation_ts>
          <short_desc>SonarQube Finding: ToasterUI uses user input for direct command execution</short_desc>
          <delta_ts>2024-10-02 12:20:23 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Toaster</product>
          <component>toaster</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>0.0.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Winter">DAWINTER</reporter>
          <assigned_to name="David Reyna">david.reyna</assigned_to>
          
          
          <qa_contact name="Toaster default assignee">toaster</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>99751</commentid>
    <comment_count>0</comment_count>
    <who name="David Winter">DAWINTER</who>
    <bug_when>2024-10-02 12:20:23 +0000</bug_when>
    <thetext>The code of method GitRevisionTypeAhead take git_url from user and pass directly to command execution without any further validation.

Constructing arguments of system commands from user input is security-sensitive pythonsecurity:S6350

Source Code Pointer: 
https://github.com/yoctoproject/poky/blob/master/bitbake/lib/toaster/toastergui/typeaheads.py#L185


See
OWASP Top 10 2021 Category A3 - Injection https://owasp.org/Top10/A03_2021-Injection/
OWASP Top 10 2017 Category A1 - Injection https://owasp.org/www-project-top-ten/2017/A1_2017-Injection
MITRE, CWE-88 - Argument Injection or Modification https://cwe.mitre.org/data/definitions/88
SANS Top 25 - Insecure Interaction Between Components https://www.sans.org/top25-software-errors/#cat1
CVE-2021-29472 - PHP Supply Chain Attack on Composer https://blog.sonarsource.com/php-supply-chain-attack-on-composer</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>