• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OCA / pylint-odoo / 1082
98%

Build:
DEFAULT BRANCH: master
Ran 04 Oct 2021 05:49PM UTC
Jobs 5
Files 7
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1082

push

travis-ci-com

web-flow
[REF] sql-injection: No sql-injection using constants (#351)

The following examples should not be considered as sql-injection:

    self.env.cr.execute("SELECT * FROM %s" % 'table_constant')
    self.env.cr.execute("SELECT * FROM {}".format('table_constant'))
    self.env.cr.execute("SELECT * FROM %(table_variable)s" % {'table_variable': 'table_constant'})

Since that the constant is not possible to inject

* [FIX] sql-injection: AttributeError: 'NoneType' object has no attribute 'parent'

Using the following code:

    queries = [
        "SELECT id FROM res_partner",
        "SELECT id FROM res_users",
    ]
    for query in queries:
        self.env.cr.execute(query)

The check sql-injection shows the following error:
 - AttributeError: 'NoneType' object has no attribute 'parent'

So, Now it is validating if it is not None

* [FIX] sql-injection: Fix false positive using BinOp "+"

Considering the following valid case:

    cr.execute('SELECT ' + operator + ' FROM table' + 'WHERE')

The representation tree is:

    node.repr_tree()
    BinOp(
    op='+',
    left=BinOp(
        op='+',
        left=BinOp(
            op='+',
            left=Const(value='SELECT '),
            right=Name(name='operator')),
        right=Const(value=' FROM table')),
    right=Const(value='WHERE'))

Notice that left node is another BinOp node
So, it need to be considered recursively

2 of 2 new or added lines in 1 file covered. (100.0%)

1517 of 1520 relevant lines covered (99.8%)

4.93 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1082.1 (TOXENV=pylint) 04 Oct 2021 05:49PM UTC 0
98.75
Travis Job 1082.1
2 1082.2 (TOXENV=pylint) 04 Oct 2021 05:50PM UTC 0
98.95
Travis Job 1082.2
3 1082.3 (TOXENV=pylint DEPLOY="1") 04 Oct 2021 05:50PM UTC 0
98.29
Travis Job 1082.3
4 1082.4 (TOXENV=pylint) 04 Oct 2021 05:51PM UTC 0
98.31
Travis Job 1082.4
5 1082.5 (TOXENV=pylint) 04 Oct 2021 05:51PM UTC 0
98.31
Travis Job 1082.5
Source Files on build 1082
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #1082
  • 5d9878a3 on github
  • Prev Build on master (#1074)
  • Next Build on master (#1084)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc