Skip to main content

Blog

ZPA Atlas 0.1.0

· 3 min read
Maintainer

ZPA Atlas 0.1.0 is out! It is a new tool, built on ZPA 4.3.0, that maps an Oracle PL/SQL and SQL codebase. It reads a folder of sources and records in one SQLite file every definition and every use of tables, columns, views, packages, subprograms, types, sequences and synonyms. Before you change one of them, it shows who uses it and what the change reaches.

What it answers​

  • Who uses it: who calls a procedure, overloads included, and who reads or writes a table or a column, including select *, column lists and triggers.
  • What a change reaches: from an object up to the entry points, grouped by package, with the path behind each one.
  • Where a column's value goes: every variable, parameter or field it is read into, how each is declared, and whether it still fits if the column grows to a size you give.
  • Which values are written: the values passed to a parameter or written to a column, such as who sets a status column to 'S'.
  • Views and triggers: which views read a table and where each view column comes from; which triggers fire on a table or column.
  • What it could not tell: every use carries a status and a reason, so an unproven answer shows as one.

Here is the page of a table of utPLSQL, from the sample index that comes with the release: its columns, and the code that uses it, statement by statement, with how each one uses it.

The page of the UT_SUITE_CACHE_PACKAGE table in ZPA Atlas: its columns and the code that selects, inserts, updates and deletes its rows

Its Impact walks up the code from the table: 40 objects may be affected, 36 of them for certain, and the entry points they are reached from.

The impact of the UT_SUITE_CACHE_PACKAGE table: 40 objects may be affected, grouped by distance, and the entry points

How to use it​

zpa-atlas index --sources path/to/sources --out atlas.db --compilation-schema HR
zpa-atlas serve --db atlas.db --sources path/to/sources

index builds the index, optionally checked against the Oracle data dictionary. serve opens a web page to search and browse the code, and an MCP endpoint at /mcp, so AI agents can ask the same questions. The index is a plain SQLite file, so it also answers SQL. Oracle Forms modules exported with frmf2xml are indexed together with the database code.

To try it without your own code, the release carries an index of utPLSQL v.3.2.3 and the sources it was built from:

tar -xzf utplsql-v.3.2.3-sources.tar.gz
zpa-atlas serve --db zpa-atlas-0.1.0-utplsql-v.3.2.3.db --sources utplsql-v.3.2.3/source

Then open http://127.0.0.1:8080 and search for ut_runner.run.

Getting it​

Download it from the release page, as a zip that needs Java 25 or as the container image ghcr.io/felipebz/zpa-atlas:0.1.0. ZPA Atlas is open source under the Apache License 2.0. See ZPA Atlas for an overview and the project documentation for indexing, serving and authentication.

ZPA Atlas is in early development: in 0.x, an index must be rebuilt with each new version, and the SQL of the index is not a stable contract.

ZPA 4.3.0

· 5 min read
Maintainer

ZPA 4.3.0 is out! This version replaces the name resolution engine. The analysis now reads the whole project before it checks a file, so a name is resolved against the declarations of every file: package specifications and bodies in separate files, standalone subprograms, object types and their methods, synonyms and the tables the sources create. It can also read the Oracle data dictionary. When a name can't be decided, because a declaration is missing or conditional text may change it, the rules that depend on it stay silent instead of guessing.

  • SonarQube compatibility: Compatible with SonarQube Community Build 26.7 and newer (tested with 26.7 to 26.11).

  • Project-wide resolution:

    • Calls bind to the overload Oracle would choose, including overloads that differ only by the type of an argument.
    • Names are resolved through %TYPE, %ROWTYPE, records, collections, object attributes and methods, and synonyms.
    • Names inside SQL are told apart from columns, also in SELECT … INTO, cursor loops and the SQL text that EXECUTE IMMEDIATE, OPEN … FOR and DBMS_SQL.PARSE build from literals.
  • Database metadata (optional): with a connection, ZPA reads the tables, views, columns, object types, synonyms and subprogram signatures of the schemas you list, in a read-only transaction. Without one, the CREATE TABLE and CREATE SYNONYM statements of the sources play the same part. See Database metadata.

  • Compilation schema: each file can be assigned the schema it compiles in, so schema-qualified names and units created without an owner resolve as they do in the database. See Compilation schema.

  • Conditional compilation: with the PLSQL_CCFLAGS of the project, the target database version, or both, ZPA evaluates $IF conditions as Oracle does and analyzes only the code that is compiled. See Conditional compilation.

  • New rules, all active by default:

    RuleNeeds metadata
    FunctionWithoutReturn: functions should not reach their end without returning a valueno
    ParameterInDynamicSql: parameters should not be concatenated into dynamic SQLno
    OuterJoinDiscardedByCondition: conditions should not discard the rows an outer join addsno
    ColumnHidesPlSqlName: columns should not shadow parameters or variables in SQL conditionsthe column must be known, from metadata or a CREATE TABLE of the sources
    ImplicitColumnConversion: character columns should not be compared with numbers or datescolumn types, from metadata or a CREATE TABLE of the sources
    NotInWithNull: NOT IN should not be used with values that may be nullonly for subqueries; lists are checked without it
    NullTestOnNotNullColumn: IS NULL conditions should not test columns that can never be nullyes
    ColumnIntoSmallerVariable: columns should not be read into variables smaller than the columnyes
  • SonarQube:

    • Each rule declares a category, sent to SonarQube as its clean code attribute and shown on the rule pages.
    • Rule descriptions are split into "Why is this an issue?" and "How can I fix it?", and most now have examples.
    • A sonar-resolve comment accepts an issue or marks it as a false positive, with a justification. See Resolving issues from comments.
    • Symbol highlighting comes from the new resolution and now covers table aliases, table names, WITH query names and FOR UPDATE OF qualifiers. Number, date and timestamp literals are highlighted as constants.
  • Oracle Forms: the Forms metadata can state the data type of each item and parameter, so host variables such as :BLOCK.ITEM are typed. ZPA Forms Extractor writes this format by default.

Before you upgrade​

All the new analysis parameters are optional; Scanning code lists them.

For custom rule developers​

Rebuild your plugins with ZPA 4.3.0. Some also need source changes:

  • ZPA now uses FLR 2.0.0, which changes AstNode: children is read-only, fromIndex and toIndex are gone, and a nonterminal that matched no input has no token. See the FLR 2.0.0 release notes.
  • New semantic queries answer which declaration a name, call, column or field refers to, whether a declaration is used, and the type of a value. They are experimental; see the Semantic API.
  • The legacy symbol model is deprecated (symbolTable, currentScope, Symbol, Scope, SymbolTable, PlSqlType, the symbol and datatype accessors of SemanticAstNode). It still works as in 4.2.x and will be removed in ZPA 5.0.
  • The experimental project API changed without deprecation, as its opt-in level allows.
  • @Rule accepts a category, and PlSqlCheckVerifier runs a check through the scanner, with settings.

For detailed release notes, please visit the full changelog.

ZPA CLI 3.3.0

· One min read
Maintainer

ZPA CLI 3.3.0 is out!

  • Includes ZPA 4.3.0, with its new semantic analysis and eight new rules. Rebuild your custom plugins with this version.
  • Database metadata: --oracle-url, --oracle-user, --oracle-schemas and the related options read table, view, synonym, object type and subprogram definitions from an Oracle database. Schema and relation names are read as Oracle reads identifiers (hr is HR, "hr" is exact). Copy the Oracle JDBC driver to the new drivers folder. See Database metadata.
  • Compilation schema: --compilation-schema and --schema-paths set the schema the units compile in.
  • Conditional compilation: --ccflags and --database-version select the $IF branches the database would compile, in every mode, including --syntax-only.
  • SonarQube report: sq-generic-issue-import now writes SonarQube's current generic issue format, with each rule's name, description, severity and clean code attribute. The severity and type moved from each issue to the rule, so tools that read the old format need to be updated.

See the updated ZPA CLI documentation for the new options.

ZPA Forms Extractor 1.0.0

· One min read
Maintainer

ZPA Forms Extractor 1.0.0 is out! It is a new tool that brings the PL/SQL code of Oracle Forms within reach of ZPA.

Forms keeps its code inside binary modules (.fmb, .mmb, .pll, .olb). The extractor opens them through Oracle's Forms API and writes:

  • every trigger, program unit, menu item and record group query to its own file, as compilable PL/SQL;
  • a metadata.json with the blocks, items, alerts and LOVs of each form, ready to be used as ZPA's Forms metadata.
zpa-forms-extractor --input forms/ --output extracted/ --metadata-format legacy
zpa-cli --sources extracted/orders.fmb --forms-metadata extracted/orders.fmb/metadata.json

The extractor runs on a machine with Oracle Forms Builder installed and needs Java 8 or newer. With ZPA 4.2.1, use --metadata-format legacy.

See Oracle Forms support for the complete workflow with the ZPA CLI and the SonarQube plugin, and the project README for installation and troubleshooting. The tool is open source under the Apache License 2.0.

Download it from the release page.

ZPA 4.2.1

· One min read
Maintainer

ZPA 4.2.1 is out!

This is a bug fix release that addresses performance problems in the lexer and parser: a regression in ZPA 4.2.0 that made the lexing time grow quadratically with the number of tokens in a file, and the exponential parsing time of malformed parentheses. It also adds a Java-friendly scanFile API to the scanner.

  • SonarQube compatibility: Compatible with SonarQube Community Build 26.2 and newer (tested with 26.2 to 26.10).

For detailed release notes, please visit the full changelog.

ZPA CLI 3.2.1

· One min read
Maintainer

ZPA CLI 3.2.1 is out!

This version includes ZPA 4.2.1, which fixes performance problems in the lexer and parser, and logs the source files being loaded.

For detailed release notes, please visit the full changelog.

ZPA CLI 3.2.0

· One min read
Maintainer

ZPA CLI 3.2.0 is out! This version makes the CLI a better fit for CI pipelines and editor integrations.

  • Includes ZPA 4.2.0, with the largest expansion of Oracle syntax support in the project's history and the new utPLSQL and DETERMINISTIC rules. Rebuild your custom plugins with this version.
  • Project context: the CLI reads the declarations of every file under --sources, so rules can resolve packages and types declared in other files. --files limits the analysis to selected files while keeping that context.
  • CI support: --fail-on sets the exit code from the severity of the findings, and the new json output format gives a stable, machine-readable report.
  • Syntax checks: --syntax-only only checks that files parse, and can read code from standard input with --files - and --stdin-filename.

See the updated ZPA CLI documentation for the options and exit codes.

For detailed release notes, please visit the full changelog.

ZPA 4.2.0

· 2 min read
Maintainer

ZPA 4.2.0 is out! This is the largest expansion of Oracle SQL and PL/SQL grammar support in the project's history. Hundreds of syntax gaps were addressed, reducing the known parsing gaps in the integration test corpus to nearly zero.

  • SonarQube compatibility: Compatible with SonarQube Community Build 26.2 and newer (tested with 26.2 to 26.10).
  • Java 21: The plugin and the ZPA Toolkit now target Java 21.
  • Grammar: New or completed support for, among others:
    • DDL for tables, indexes, sequences, views, materialized views, domains, types, users, roles, tablespaces and pluggable databases
    • ALTER DATABASE, ALTER DISKGROUP, ADMINISTER KEY MANAGEMENT, AUDIT/NOAUDIT and other administration statements
    • MODEL, MATCH_RECOGNIZE, WINDOW and QUALIFY clauses, CROSS APPLY/OUTER APPLY and LATERAL inline views
    • SQL/JSON functions and JSON relational duality views
    • Vector datatype, functions and indexes, property graphs (GRAPH_TABLE) and MLE modules
    • Wrapped PL/SQL units
  • New rules:
  • utPLSQL: Six new rules for test code validate how utPLSQL reads the annotations: ConflictingUtPlSqlAnnotations, IneffectiveUtPlSqlAnnotation, InvalidUtPlSqlAnnotationArgument, InvalidUtPlSqlContextStructure, UnresolvedUtPlSqlSetupCleanupReference and UtPlSqlTestShouldHaveDescription (not activated by default). DisabledTest now reports every effective test annotated with %disabled, even when the annotation has a comment.
  • Project-aware analysis: ZPA now collects declarations from all files of the project, resolving package specifications, package bodies and RECORD types across files. Custom rules can use this information through an experimental API.
  • QueryWithoutExceptionHandling no longer reports single-group aggregate queries, which always return one row.
  • The ZPA Toolkit can now inspect the semantic information of the analyzed code.

For detailed release notes, please visit the full changelog.

ZPA CLI 3.1.0

· One min read
Maintainer

ZPA CLI 3.1.0 is out!

  • Includes ZPA 4.1.0. Rebuild your custom plugins with this version.
  • Configuration file: rules created from templates are validated, with clearer error messages for invalid rule keys and template settings.
  • The universal distribution now requires Java 21 or newer.

For detailed release notes, please visit the full changelog.

ZPA 4.1.0

· One min read
Maintainer

ZPA 4.1.0 is out! This version brings parser and semantic analysis improvements.

  • SonarQube compatibility: Compatible with SonarQube Community Build 25.8 and newer (tested with 25.8 to 26.4).
  • Support for DEFAULT ON NULL in column definitions. Thanks to Timo Widdau for the contribution!
  • VARRAY types are now supported in the symbol analysis.
  • Fixed the precedence between IN conditions and string concatenation (||).

For detailed release notes, please visit the full changelog.