Frameworks-QtSupport

Configuration support for projects using Qt

Required inputs: IR

This rule simplifies the configuration of projects using Qt. It suppresses issues resulting from the required used of Qt macros like Q_OBJECT and it evaluates calls to Qt's connect() function to determine call relations for the connection between signals and slots.

Also it adds filename patterns:

  • */mocs_compilation*.cpp
  • */moc_*.cpp
  • *.moc
  • */qrc_*.cpp
  • */ui_*.h
  • */qmlcache/*
  • mocs_compilation*.cpp
  • moc_*.cpp
  • qrc_*.cpp
  • ui_*.h
  • qmlcache/*

to C++CloneDetection/pre_excludes and optionally to the global excludes for files generated by Qt.

For Qt-specific rules, there exists the rulegroup Qt.

Possible Messages

This rule has no predefined messages.

Options

The following places define options that affect this rule: Analysis-GlobalOptions

create_qt_connect_edges

create_qt_connect_edges : bool = True

If true (default), create Qt_MetaObject_Call edges between signals and slots that are connected with detectable connect() calls. Qt_Connect_Signal and Qt_Connect_Slot edges are created between routines containing connect() calls and the referenced signals and slots respectively. All these edges are created and inserted into the views Code Facts and Declaration Facts.
 

exclude_qt_generated_files

exclude_qt_generated_files : bool = True

If true, filename patterns for files generated by Qt will be implicitly added to the global excludes. The patterns can be configured via qt_exclude_patterns and the defaults are:
  • */mocs_compilation*.cpp
  • */moc_*.cpp
  • *.moc
  • */qrc_*.cpp
  • */ui_*.h
  • */qmlcache/*
  • mocs_compilation*.cpp
  • moc_*.cpp
  • qrc_*.cpp
  • ui_*.h
  • qmlcache/*
In addition, also everything beneath qtdir (if configured or derived from the IR) is excluded.
 

excluded_external_sources

excluded_external_sources

Type: set[bauhaus.analysis.config.QualifiedName]

Default: {'QAnyStringView::QAnyStringView', 'QAnyStringView::back', 'QAnyStringView::data', 'QAnyStringView::empty', 'QAnyStringView::first', 'QAnyStringView::front', 'QAnyStringView::isEmpty', 'QAnyStringView::last', 'QAnyStringView::length', 'QAnyStringView::size', 'QBasicUtf8StringView::QBasicUtf8StringView', 'QBasicUtf8StringView::at', 'QBasicUtf8StringView::back', 'QBasicUtf8StringView::begin', 'QBasicUtf8StringView::cbegin', 'QBasicUtf8StringView::cend', 'QBasicUtf8StringView::data', 'QBasicUtf8StringView::empty', 'QBasicUtf8StringView::end', 'QBasicUtf8StringView::first', 'QBasicUtf8StringView::front', 'QBasicUtf8StringView::isEmpty', 'QBasicUtf8StringView::last', 'QBasicUtf8StringView::length', 'QBasicUtf8StringView::size', 'QBitArray::QBitArray', 'QBitArray::at', 'QBitArray::count', 'QBitArray::isEmpty', 'QBitArray::size', 'QByteArray::QByteArray', 'QByteArray::at', 'QByteArray::back', 'QByteArray::begin', 'QByteArray::cbegin', 'QByteArray::cend', 'QByteArray::constBegin', 'QByteArray::constData', 'QByteArray::constEnd', 'QByteArray::contains', 'QByteArray::count', 'QByteArray::data', 'QByteArray::end', 'QByteArray::first', 'QByteArray::front', 'QByteArray::indexOf', 'QByteArray::isEmpty', 'QByteArray::last', 'QByteArray::lastIndexOf', 'QByteArray::length', 'QByteArray::size', 'QByteArrayView::QByteArrayView', 'QByteArrayView::at', 'QByteArrayView::back', 'QByteArrayView::begin', 'QByteArrayView::cbegin', 'QByteArrayView::cend', 'QByteArrayView::constData', 'QByteArrayView::contains', 'QByteArrayView::count', 'QByteArrayView::data', 'QByteArrayView::empty', 'QByteArrayView::end', 'QByteArrayView::first', 'QByteArrayView::front', 'QByteArrayView::indexOf', 'QByteArrayView::isEmpty', 'QByteArrayView::last', 'QByteArrayView::lastIndexOf', 'QByteArrayView::length', 'QByteArrayView::size', 'QContiguousCache::QContiguousCache', 'QContiguousCache::at', 'QContiguousCache::count', 'QContiguousCache::first', 'QContiguousCache::isEmpty', 'QContiguousCache::last', 'QContiguousCache::size', 'QExplicitlySharedDataPointer::QExplicitlySharedDataPointer', 'QExplicitlySharedDataPointer::constData', 'QExplicitlySharedDataPointer::data', 'QExplicitlySharedDataPointer::get', 'QHash::QHash', 'QHash::begin', 'QHash::cbegin', 'QHash::cend', 'QHash::constBegin', 'QHash::constEnd', 'QHash::contains', 'QHash::count', 'QHash::empty', 'QHash::end', 'QHash::isEmpty', 'QHash::size', 'QHash::value', 'QLatin1String::QLatin1String', 'QLatin1String::at', 'QLatin1String::back', 'QLatin1String::begin', 'QLatin1String::cbegin', 'QLatin1String::cend', 'QLatin1String::constBegin', 'QLatin1String::constData', 'QLatin1String::constEnd', 'QLatin1String::contains', 'QLatin1String::count', 'QLatin1String::data', 'QLatin1String::empty', 'QLatin1String::end', 'QLatin1String::first', 'QLatin1String::front', 'QLatin1String::indexOf', 'QLatin1String::isEmpty', 'QLatin1String::last', 'QLatin1String::lastIndexOf', 'QLatin1String::length', 'QLatin1String::size', 'QLine::QLine', 'QLine::dx', 'QLine::dy', 'QLine::p1', 'QLine::p2', 'QLine::x1', 'QLine::x2', 'QLine::y1', 'QLine::y2', 'QLineF::QLineF', 'QLineF::dx', 'QLineF::dy', 'QLineF::length', 'QLineF::p1', 'QLineF::p2', 'QLineF::x1', 'QLineF::x2', 'QLineF::y1', 'QLineF::y2', 'QList::QList', 'QList::at', 'QList::back', 'QList::begin', 'QList::cbegin', 'QList::cend', 'QList::constBegin', 'QList::constData', 'QList::constEnd', 'QList::constFirst', 'QList::constLast', 'QList::contains', 'QList::count', 'QList::data', 'QList::empty', 'QList::end', 'QList::first', 'QList::front', 'QList::indexOf', 'QList::isEmpty', 'QList::last', 'QList::lastIndexOf', 'QList::length', 'QList::size', 'QList::value', 'QListSpecialMethods::contains', 'QListSpecialMethods::indexOf', 'QListSpecialMethods::lastIndexOf', 'QListSpecialMethodsBase::contains', 'QListSpecialMethodsBase::indexOf', 'QListSpecialMethodsBase::lastIndexOf', 'QMap::QMap', 'QMap::begin', 'QMap::cbegin', 'QMap::cend', 'QMap::constBegin', 'QMap::constEnd', 'QMap::contains', 'QMap::count', 'QMap::empty', 'QMap::end', 'QMap::first', 'QMap::isEmpty', 'QMap::last', 'QMap::size', 'QMap::value', 'QMargins::QMargins', 'QMargins::bottom', 'QMargins::left', 'QMargins::right', 'QMargins::top', 'QMultiHash::QMultiHash', 'QMultiHash::begin', 'QMultiHash::cbegin', 'QMultiHash::cend', 'QMultiHash::constBegin', 'QMultiHash::constEnd', 'QMultiHash::contains', 'QMultiHash::count', 'QMultiHash::empty', 'QMultiHash::end', 'QMultiHash::isEmpty', 'QMultiHash::size', 'QMultiHash::value', 'QMultiMap::QMultiMap', 'QMultiMap::begin', 'QMultiMap::cbegin', 'QMultiMap::cend', 'QMultiMap::constBegin', 'QMultiMap::constEnd', 'QMultiMap::contains', 'QMultiMap::count', 'QMultiMap::empty', 'QMultiMap::end', 'QMultiMap::first', 'QMultiMap::isEmpty', 'QMultiMap::last', 'QMultiMap::size', 'QMultiMap::value', 'QObject::connect', 'QPaintDevice::depth', 'QPaintDevice::devicePixelRatio', 'QPaintDevice::devicePixelRatioF', 'QPaintDevice::height', 'QPaintDevice::width', 'QPoint::QPoint', 'QPoint::isNull', 'QPoint::manhattanLength', 'QPoint::x', 'QPoint::y', 'QPointF::QPointF', 'QPointF::isNull', 'QPointF::manhattanLength', 'QPointF::x', 'QPointF::y', 'QPointer::QPointer', 'QPointer::data', 'QPointer::get', 'QRect::QRect', 'QRect::bottom', 'QRect::bottomLeft', 'QRect::bottomRight', 'QRect::center', 'QRect::contains', 'QRect::height', 'QRect::isEmpty', 'QRect::isNull', 'QRect::isValid', 'QRect::left', 'QRect::right', 'QRect::size', 'QRect::top', 'QRect::topLeft', 'QRect::topRight', 'QRect::width', 'QRect::x', 'QRect::y', 'QRectF::QRectF', 'QRectF::bottom', 'QRectF::bottomLeft', 'QRectF::bottomRight', 'QRectF::center', 'QRectF::contains', 'QRectF::height', 'QRectF::isEmpty', 'QRectF::isNull', 'QRectF::isValid', 'QRectF::left', 'QRectF::right', 'QRectF::size', 'QRectF::top', 'QRectF::topLeft', 'QRectF::topRight', 'QRectF::width', 'QRectF::x', 'QRectF::y', 'QScopedPointer::QScopedPointer', 'QScopedPointer::data', 'QScopedPointer::get', 'QSet::QSet', 'QSet::begin', 'QSet::cbegin', 'QSet::cend', 'QSet::constBegin', 'QSet::constEnd', 'QSet::contains', 'QSet::count', 'QSet::empty', 'QSet::end', 'QSet::isEmpty', 'QSet::size', 'QSharedDataPointer::QSharedDataPointer', 'QSharedDataPointer::constData', 'QSharedDataPointer::data', 'QSharedDataPointer::get', 'QSharedDataPointerBase::constData', 'QSharedDataPointerBase::data', 'QSharedDataPointerBase::get', 'QSharedPointer::QSharedPointer', 'QSharedPointer::data', 'QSharedPointer::get', 'QSize::QSize', 'QSize::height', 'QSize::isEmpty', 'QSize::isNull', 'QSize::isValid', 'QSize::width', 'QSizeF::QSizeF', 'QSizeF::height', 'QSizeF::isEmpty', 'QSizeF::isNull', 'QSizeF::isValid', 'QSizeF::width', 'QSpan::QSpan', 'QSpan::back', 'QSpan::begin', 'QSpan::cbegin', 'QSpan::cend', 'QSpan::data', 'QSpan::empty', 'QSpan::end', 'QSpan::first', 'QSpan::front', 'QSpan::isEmpty', 'QSpan::last', 'QSpan::size', 'QStaticByteArrayData::data_ptr', 'QStaticStringData::data_ptr', 'QString::QString', 'QString::at', 'QString::back', 'QString::begin', 'QString::cbegin', 'QString::cend', 'QString::constBegin', 'QString::constData', 'QString::constEnd', 'QString::contains', 'QString::count', 'QString::data', 'QString::end', 'QString::first', 'QString::front', 'QString::indexOf', 'QString::isEmpty', 'QString::last', 'QString::lastIndexOf', 'QString::length', 'QString::size', 'QStringView::QStringView', 'QStringView::at', 'QStringView::back', 'QStringView::begin', 'QStringView::cbegin', 'QStringView::cend', 'QStringView::constBegin', 'QStringView::constData', 'QStringView::constEnd', 'QStringView::contains', 'QStringView::count', 'QStringView::data', 'QStringView::empty', 'QStringView::end', 'QStringView::first', 'QStringView::front', 'QStringView::indexOf', 'QStringView::isEmpty', 'QStringView::last', 'QStringView::lastIndexOf', 'QStringView::length', 'QStringView::size', 'QVLABase::back', 'QVLABase::begin', 'QVLABase::cbegin', 'QVLABase::cend', 'QVLABase::contains', 'QVLABase::data', 'QVLABase::end', 'QVLABase::front', 'QVLABase::indexOf', 'QVLABase::lastIndexOf', 'QVLABase::value', 'QVLABaseBase::empty', 'QVLABaseBase::size', 'QVarLengthArray::QVarLengthArray', 'QVarLengthArray::at', 'QVarLengthArray::constBegin', 'QVarLengthArray::constData', 'QVarLengthArray::constEnd', 'QVarLengthArray::count', 'QVarLengthArray::first', 'QVarLengthArray::isEmpty', 'QVarLengthArray::last', 'QVarLengthArray::length', 'QVector::QVector', 'QVector::at', 'QVector::back', 'QVector::begin', 'QVector::cbegin', 'QVector::cend', 'QVector::constBegin', 'QVector::constData', 'QVector::constEnd', 'QVector::constFirst', 'QVector::constLast', 'QVector::contains', 'QVector::count', 'QVector::data', 'QVector::empty', 'QVector::end', 'QVector::first', 'QVector::front', 'QVector::indexOf', 'QVector::isEmpty', 'QVector::last', 'QVector::lastIndexOf', 'QVector::length', 'QVector::size', 'QVector::value', 'QWidget::height', 'QWidget::pos', 'QWidget::rect', 'QWidget::size', 'QWidget::width', 'QWidget::x', 'QWidget::y', 'QWindow::devicePixelRatio', 'QWindow::height', 'QWindow::size', 'QWindow::width', 'QWindow::x', 'QWindow::y', 'QtPrivate::contains', 'QtPrivate::count', 'QtPrivate::indexOf', 'QtPrivate::lastIndexOf', 'QtPrivate::qMakeStringPrivate', 'qAbs', 'qBound', 'qCeil', 'qFloor', 'qFuzzyCompare', 'qFuzzyIsNull', 'qHash', 'qMax', 'qMin', 'qRound', 'qRound64', 'qt_ptr_swap'}

Qt functions whose return values and arguments taint-based rules such as FaultDetection-TaintAnalysis do not treat as external input, in addition to the excludes of their option external_sources.
 

external_input_entries

external_input_entries

Type: set[bauhaus.analysis.config.QualifiedName]

Default: {'QAbstractItemModel::canDropMimeData', 'QAbstractItemModel::dropMimeData', 'QAbstractNativeEventFilter::nativeEventFilter', 'QGraphicsItem::dragEnterEvent', 'QGraphicsItem::dragMoveEvent', 'QGraphicsItem::dropEvent', 'QGraphicsItem::inputMethodEvent', 'QGraphicsItem::keyPressEvent', 'QGraphicsItem::keyReleaseEvent', 'QGraphicsScene::dragEnterEvent', 'QGraphicsScene::dragMoveEvent', 'QGraphicsScene::dropEvent', 'QGraphicsScene::inputMethodEvent', 'QGraphicsScene::keyPressEvent', 'QGraphicsScene::keyReleaseEvent', 'QLocalServer::incomingConnection', 'QQuickItem::dragEnterEvent', 'QQuickItem::dragMoveEvent', 'QQuickItem::dropEvent', 'QQuickItem::inputMethodEvent', 'QQuickItem::keyPressEvent', 'QQuickItem::keyReleaseEvent', 'QTcpServer::incomingConnection', 'QValidator::fixup', 'QValidator::validate', 'QWidget::dragEnterEvent', 'QWidget::dragMoveEvent', 'QWidget::dropEvent', 'QWidget::inputMethodEvent', 'QWidget::keyPressEvent', 'QWidget::keyReleaseEvent', 'QWidget::nativeEvent', 'QWindow::keyPressEvent', 'QWindow::keyReleaseEvent', 'QWindow::nativeEvent', 'qMain'}

Entry points whose parameters, and those of their redefinitions, taint-based rules such as FaultDetection-TaintAnalysis treat as external input, while the parameters of the other entry points this rule adds are not taint sources.
 

qt_exclude_in_macros

qt_exclude_in_macros : set[str] = {'Q_DECLARE_*', 'Q_DISABLE_COPY', 'Q_ENUM', 'Q_GADGET', 'Q_GLOBAL_STATIC', 'Q_OBJECT'}

Macro name patterns for Qt-internal macros where no rule should be applied.
 

qt_exclude_patterns

qt_exclude_patterns

Type: set[bauhaus.analysis.config.FileGlobPattern]

Default: {'*.moc', '*/moc_*.cpp', '*/mocs_compilation*.cpp', '*/qmlcache/*', '*/qrc_*.cpp', '*/ui_*.h', 'moc_*.cpp', 'mocs_compilation*.cpp', 'qmlcache/*', 'qrc_*.cpp', 'ui_*.h'}

Filename patterns for files generated by Qt.
 

qt_types

qt_types : set[bauhaus.analysis.config.QualifiedName] = {'QObject'}

Set of qualified type names to be ignored or considered by other rules. Currently, only the rule AutosarC++-A18.5.2 uses this value for its option allow_for_types_and_subtypes if unset. For this Autosar rule also the option qtdir and exclude_qt_generated_files should be set to avoid violations within the Qt library.
 

qtdir

qtdir : bauhaus.analysis.config.LayerRelativePath | None = None

Directory beneath which the Qt headers are located. It is used to determine several additional entry points (Qt public methods, redefinitions of public Qt virtual methods as commonly used in, for example, user-defined plugins, undefined senders from the Qt directory). If this option is unset or empty, the value of the environment variable QTDIR or the parent directory of QTINCDIR is used, and if both are unset, it is auto-detected as the directory containing QtCore/qchar.h in the IR. Set this option if neither applies.
 

taint_sinks

Qt functions that taint-based rules consider as sinks of the categories they name in their option framework_sink_categories.
 

taint_sinks.command

Type: dict[bauhaus.analysis.config.QualifiedName, ArgumentSpecifier]

Default:

{
   'QProcess::execute':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={0, 1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QProcess::setArguments':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QProcess::setProgram':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QProcess::start':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1, 2},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QProcess::startCommand':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QProcess::startDetached':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={0, 1, 2},
      argument_range_max=4294967295,
      argument_range_min=0
   )
}
Qt functions that start the program given by the selected arguments.
 

taint_sinks.path

Type: dict[bauhaus.analysis.config.QualifiedName, ArgumentSpecifier]

Default:

{
   'QDir::QDir':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QDir::cd':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QDir::mkdir':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QDir::mkpath':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QDir::remove':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QDir::rename':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1, 2},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QDir::rmdir':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QDir::rmpath':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QDir::setPath':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QFile::QFile':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QFile::copy':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={0, 1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QFile::link':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={0, 1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QFile::remove':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={0},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QFile::rename':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={0, 1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QFile::setFileName':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QLibrary::QLibrary':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QLibrary::setFileName':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QLockFile::QLockFile':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QPluginLoader::QPluginLoader':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QPluginLoader::setFileName':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QSaveFile::QSaveFile':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QSaveFile::setFileName':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   )
}
Qt functions that open, load, create, rename or remove the file or directory given by the selected arguments.
 

taint_sinks.sql

Type: dict[bauhaus.analysis.config.QualifiedName, ArgumentSpecifier]

Default:

{
   'QSqlDatabase::exec':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QSqlQuery::QSqlQuery':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QSqlQuery::exec':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QSqlQuery::prepare':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QSqlQueryModel::setQuery':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QSqlTableModel::setFilter':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   )
}
Qt functions that execute the SQL statement or condition given by the selected arguments.
 

taint_sources

Qt functions that taint-based rules consider as sources of the categories they name in their option framework_source_categories.
 

taint_sources.environment

Qt functions that read environment variables.
 

taint_sources.environment.arguments_of

Type: dict[bauhaus.analysis.config.QualifiedName, ArgumentSpecifier]

Default: {}

Functions that write external input to the selected pointer or reference arguments.
 

taint_sources.environment.return_values_of

Type: set[bauhaus.analysis.config.QualifiedName]

Default: {'QProcessEnvironment::systemEnvironment', 'QProcessEnvironment::toStringList', 'QProcessEnvironment::value', 'qEnvironmentVariable', 'qEnvironmentVariableIntValue', 'qgetenv'}

Functions whose return value is external input.
 

taint_sources.input

Qt functions that read from files, devices, processes, the network, the clipboard, the command line, settings or input widgets.
 

taint_sources.input.arguments_of

Type: dict[bauhaus.analysis.config.QualifiedName, ArgumentSpecifier]

Default:

{
   'QDataStream::operator>>':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QDataStream::readBytes':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QDataStream::readRawData':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QIODevice::getChar':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QIODevice::peek':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QIODevice::read':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QIODevice::readLine':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QTextStream::operator>>':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QTextStream::readLineInto':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   ),
   'QUdpSocket::readDatagram':    bauhaus.rules.axivion.expressions.generic.taint_analysis.ArgumentSpecifier(
      argument_numbers_set={1},
      argument_range_max=4294967295,
      argument_range_min=0
   )
}
Functions that write external input to the selected pointer or reference arguments.
 

taint_sources.input.return_values_of

Type: set[bauhaus.analysis.config.QualifiedName]

Default: {'QClipboard::mimeData', 'QClipboard::text', 'QCommandLineParser::positionalArguments', 'QCommandLineParser::value', 'QCommandLineParser::values', 'QCoreApplication::arguments', 'QIODevice::peek', 'QIODevice::read', 'QIODevice::readAll', 'QIODevice::readLine', 'QInputDialog::getDouble', 'QInputDialog::getInt', 'QInputDialog::getItem', 'QInputDialog::getMultiLineText', 'QInputDialog::getText', 'QLineEdit::text', 'QMimeData::data', 'QMimeData::html', 'QMimeData::text', 'QMimeData::urls', 'QNetworkDatagram::data', 'QProcess::readAllStandardError', 'QProcess::readAllStandardOutput', 'QSettings::value', 'QTextStream::read', 'QTextStream::readAll', 'QTextStream::readLine', 'QUdpSocket::receiveDatagram'}

Functions whose return value is external input.
 

Option Types

These types are used by options listed above:

ArgumentSpecifier

Specification of which argument positions to consider: An argument at position x is included if ALL of the following conditions are met: * x is within the specified range: argument_range_min ≤ x ≤ argument_range_max * Either no specific arguments are listed (argument_numbers_set is empty), OR x is explicitly listed in argument_numbers_set Positions start at 0. The object of a member or constructor call, passed to the this parameter or to an explicit object parameter, is position 0, so the first explicit argument of such a call is position 1. Examples: * To target the first 5 variadic arguments of sscanf (positions 2-6): set argument_range_min = 2, argument_range_max = 6, leave argument_numbers_set empty * To target only the format string of sscanf (position 1): set argument_numbers_set = {1} and keep default values for argument_range_min and argument_range_max
 

argument_numbers_set : set[int] = set()

Explicit set of argument numbers to be considered. If empty, all numbers of the interval defined by [argument_range_min; argument_range_max] are considered.
 

argument_range_max : int = 4294967295

Maximum of the interval of numbers to be considered.
 

argument_range_min : int = 0

Minimum of the interval of numbers to be considered.