Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-810

Sanitize SQL statements

    XMLWordPrintable

    Details

      Description

      We should use SQLite preparation using the ? character to prevent eventual SQL injections:

      % bandit nuxeo-drive-client/nxdrive/engine/dao/sqlite.py
      Test results:
      >> Issue: [B608:hardcoded_sql_expressions] Possible SQL injection vector through string-based query construction.
         Severity: Medium   Confidence: Medium
         Location: nuxeo-drive-client/nxdrive/engine/dao/sqlite.py:176
      175	        if migrate:
      176	            res = c.execute("SELECT value FROM Configuration WHERE name='"+SCHEMA_VERSION+"'").fetchone()
      177	            if res is None:
      
      # (...)
      
      Run metrics:
      	Total issues (by severity):
      		Undefined: 0
      		Low: 0
      		Medium: 23
      		High: 0
      

        Attachments

          Activity

            People

            • Assignee:
              mschoentgen Mickaël Schoentgen
              Reporter:
              mschoentgen Mickaël Schoentgen
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 minute
                1m