Skip to content

chore(deps): update semgrep to the latest#1438

Merged
behnazh-w merged 2 commits into
mainfrom
behnazh/update-semgrep
Jul 26, 2026
Merged

chore(deps): update semgrep to the latest#1438
behnazh-w merged 2 commits into
mainfrom
behnazh/update-semgrep

Conversation

@behnazh-w

@behnazh-w behnazh-w commented Jul 25, 2026

Copy link
Copy Markdown
Member

Summary

Update semgrep to the latest version and remove the ignored advisories found in its dependencies. This PR also improves some of the tests that would fail on Python 3.14.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 25, 2026
Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
@behnazh-w
behnazh-w force-pushed the behnazh/update-semgrep branch from 5ff559c to fe4cac0 Compare July 25, 2026 07:40

@jenstroeger jenstroeger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that create_engine() is called in different places for local instances of SQLA’s Engine though it should be a single global instance for the application’s lifetime, see also docs here and here. Similarly, I think the test fixture macaron_db_session() could use context managers for its session.

Comment thread tests/database/test_database_manager.py Outdated
@behnazh-w

Copy link
Copy Markdown
Member Author

I noticed that create_engine() is called in different places for local instances of SQLA’s Engine though it should be a single global instance for the application’s lifetime

We have three main CLI commands that need their own engines, but for the duration of a command, we only create one engine. The three CLI commands that are run independently are analyze, verify-policy, and gen-build-spec.

Similarly, I think the test fixture macaron_db_session() could use context managers for its session.

Yes, we could improve that in a future PR perhaps.

Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
@behnazh-w
behnazh-w merged commit fc3429c into main Jul 26, 2026
19 checks passed
Comment on lines 40 to +41
con = sqlite3.connect(DB_PATH)
with con:
with closing(con), con:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, you’re not using pylint’s code-style checker so you didn’t get the tip to change these into

with closing(con := sqlite3.connect(DB_PATH)), con:
    ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants