From b1015203e5a835e5a2753551292e3cab2ceda0df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Emarianfoo=E2=80=9C?= <13335743+marianfoo@users.noreply.github.com> Date: Thu, 6 Aug 2026 14:34:59 +0200 Subject: [PATCH 1/5] test: define native SQL security boundary --- docs/plans/base-sec-002.md | 49 ++++++++++++++++ .../2026-08-06-base-sec-002-native-sql.md | 58 +++++++++++++++++++ scripts/repository-contract.mjs | 11 +++- 3 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 docs/plans/base-sec-002.md create mode 100644 docs/research/2026-08-06-base-sec-002-native-sql.md diff --git a/docs/plans/base-sec-002.md b/docs/plans/base-sec-002.md new file mode 100644 index 0000000..e3f460c --- /dev/null +++ b/docs/plans/base-sec-002.md @@ -0,0 +1,49 @@ +# BASE-SEC-002 plan: retire arbitrary Native SQL + +_Date: 2026-08-06 · branch: `codex/fix-base-sec-002`_ + +## Goal + +Remove the externally controlled Native SQL execution boundary and unsupported `C_DB_EXECUTE` call while preserving existing ABAP SQL SELECT, INSERT, UPDATE, and DELETE behavior. + +## Patch contract + +- Vulnerable source-to-sink: editor input → `QUERY_PARSE_NOSELECT` → `QUERY_PROCESS_NATIVE` → `C_DB_EXECUTE`. +- Attacker prerequisite: access to ZTOAD plus activity `16` in `ZTOAD_AUTH`, or a system with fallback `auth_native` enabled. +- Invariant: `NATIVE` always fails closed and no user-supplied statement reaches a Native SQL API/kernel call. +- Preserved behavior: normal query parsing/generation, UPDATE and DELETE parsing, GUI startup, authorization for supported ABAP SQL commands, SAP_BASIS 750 syntax. +- Intentional compatibility change: the legacy `NATIVE` feature cannot be enabled after this patch. + +## Reviewed sequence + +1. Revalidate the live source-to-sink path and SAP guidance; document why an ADBC API swap or regex allow list would not close the injection boundary. +2. Add an architectural repository contract that fails while `C_DB_EXECUTE` exists; run `npm test` and record the focused red failure. +3. Review the plan for security closure, legitimate behavior, 7.50 compatibility, Clean ABAP/Clean Core, error semantics, rollback, and live-test safety. +4. Add ABAP Unit tests proving default rejection and rejection despite the legacy enable flag. Preserve positive UPDATE/DELETE parser tests. +5. Make the smallest production change: reject `NATIVE` unconditionally, remove its dispatch branch, and delete `QUERY_PROCESS_NATIVE`/`C_DB_EXECUTE`. +6. Review touched code against Clean ABAP without mass-refactoring the legacy report. Run `npm ci`, `npm test`, `npm run lint:quality`, `git diff --check`, security bypass review, and verify that reverting the production change makes the focused tests red. +7. Deploy the exact candidate to A4H with ARC-1, activate explicitly, compare active/inactive main source, review inactive child parts, run active syntax, all ABAP Unit tests, and ATC variants. +8. Run a fresh A4H transaction-start smoke and pre/post ST22 delta without executing SQL. Keep missing `STATUS010` classified as `BASE-BUG-007`. +9. Probe NPL only through ARC-1/ADT and record the existing missing-object prerequisite honestly. +10. Complete final diff/security/release review, update the findings register and documentation, open a draft PR, and wait for the first green CI cycle. +11. Audit the workflow and CI output after first green, apply clearly beneficial process improvements in the same PR, move this plan to `docs/plans/finished/`, and wait for final green CI. + +## Plan review + +- Removing the feature is narrower and more secure than building a new database-administration subsystem inside this bug fix. +- Parser tests exercise the real command boundary and the repository contract permanently prevents the unsupported sink from returning. +- No destructive proof is necessary or allowed: rejection before execution is the behavior under test. +- The existing confirmation popup is deleted with the executor because user confirmation cannot authorize otherwise unsafe SQL text. +- The legacy customization fields can remain temporarily for persisted-layout compatibility, but they must no longer affect control flow; their later removal is non-security cleanup. +- No serializer XML or structural object changes belong in this source-only PR. + +## Evidence log + +- Baseline: `npm ci` reports 0 vulnerabilities; `npm test` passes with 0 configured abaplint issues; full diagnostic lint reports 1,878 findings across 58 rules. +- Red repository contract: `npm test` reached the new focused assertion and failed because `src/ztoad.prog.abap` still contains `C_DB_EXECUTE` (`AssertionError: Unsupported native SQL kernel call C_DB_EXECUTE must not exist`). Configured abaplint remained green with 0 findings before the contract ran. +- ABAP Unit red/green: pending. +- Local final checks: pending. +- A4H: pending. +- NPL ADT-only: pending. +- First PR CI: pending. +- Post-green audit/final CI: pending. diff --git a/docs/research/2026-08-06-base-sec-002-native-sql.md b/docs/research/2026-08-06-base-sec-002-native-sql.md new file mode 100644 index 0000000..94f0f52 --- /dev/null +++ b/docs/research/2026-08-06-base-sec-002-native-sql.md @@ -0,0 +1,58 @@ +# BASE-SEC-002 native SQL research + +_Date: 2026-08-06 · finding: `BASE-SEC-002`_ + +## Revalidated vulnerable path + +The finding is reachable in the current `master` source: + +1. An authenticated ZTOAD user enters `NATIVE ` in the editor. +2. `QUERY_PARSE_NOSELECT` accepts the command when authorization object `ZTOAD_AUTH` grants activity `16`, or when the fallback `auth_native` flag is enabled. +3. The parser copies the remainder of the user input into `FW_PARAM`, changing only single quotes to double quotes. +4. `QUERY_PROCESS` calls `QUERY_PROCESS_NATIVE` directly. +5. `QUERY_PROCESS_NATIVE` truncates the external statement to 255 characters and passes it to unsupported kernel call `C_DB_EXECUTE` after only a confirmation popup. + +The popup is not a security boundary: it neither constrains the database object nor validates statement semantics. A user who can reach this path can submit vendor-specific DDL or DML outside ABAP SQL client handling and outside ZTOAD's normal table-specific authorization checks. + +## Security contract + +- No SQL statement supplied through the ZTOAD editor may reach a Native SQL API or kernel call. +- `C_DB_EXECUTE` must not exist in repository source. +- `NATIVE` must be rejected even if legacy customization or authorization would previously have enabled it. +- Existing SELECT, INSERT, UPDATE, and DELETE behavior is outside this patch and must remain unchanged. + +## Options evaluated + +### Replace the kernel call with ADBC + +Rejected for this finding. SAP recommends ADBC instead of older Native SQL mechanisms, but also states that SQL text outside operand positions must not originate externally and that operands must use placeholders. Passing the complete editor command to `CL_SQL_STATEMENT` would remove the unsupported call while preserving the injection boundary. + +### Add a database-specific allow list + +Rejected as disproportionate and incomplete. A safe implementation would need a database-specific grammar, strict object resolution, table-specific authorization, client isolation, placeholder binding, DDL/DML policy, and destructive integration fixtures on both supported database/release targets. A token or regular-expression list would be bypass-prone and would not justify retaining an arbitrary administrative channel in this general SQL viewer. + +### Retire the `NATIVE` command + +Selected. The feature is already disabled by default, its implementation is unsupported and database-specific, and removing it closes the boundary without changing supported ABAP SQL query behavior. The parser will fail closed for `NATIVE` regardless of the legacy flag, and the executor form/kernel call will be deleted. + +## TDD and validation design + +- A dependency-free repository contract must fail while `C_DB_EXECUTE` remains and stay in the normal `npm test`/CI path. +- ABAP Unit must prove `NATIVE` is rejected by default and cannot be re-enabled through the legacy fallback flag. +- Existing positive command-parser tests must prove UPDATE and DELETE parsing remain intact. +- A4H must explicitly activate the candidate and pass active syntax, all ABAP Unit tests, ATC review, object/child-part state review, and a safe launch/ST22 delta. No native command will be executed. +- NPL remains ARC-1/ADT-only. Exact ZTOAD validation is blocked while its report/table are absent; no GUI fallback or substitute table is allowed. + +## Compatibility, clean core, and release impact + +- The patch uses no syntax newer than the SAP_BASIS 750 floor. +- Removing `C_DB_EXECUTE` eliminates the current unsupported-call syntax warning and one direct clean-core violation. +- This is an intentional breaking security change for users who enabled `NATIVE`; it requires a release note. +- Rollback is not recommended because it would reopen arbitrary Native SQL execution. Database administration belongs in purpose-built, audited tooling rather than ZTOAD. + +## SAP sources + +- [Security Risks Caused by Input from Outside](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/ABENDYNAMIC_PROGRAMMING_SCRTY.html) +- [SQL Injections in Generated Programs](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/ABENSQL_INJ_GEN_PROG_SCRTY.html) +- [SQL Injections in Dynamic Tokens](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/ABENSQL_INJ_DYN_TOKENS_SCRTY.html) +- [ABAP Database Connectivity](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/ABENADBC.html) diff --git a/scripts/repository-contract.mjs b/scripts/repository-contract.mjs index 2bee415..59d1ffc 100644 --- a/scripts/repository-contract.mjs +++ b/scripts/repository-contract.mjs @@ -2,8 +2,10 @@ import { readFile } from "node:fs/promises"; import { strict as assert } from "node:assert"; const transactionPath = new URL("../src/ztoad.tran.xml", import.meta.url); +const reportPath = new URL("../src/ztoad.prog.abap", import.meta.url); let transactionXml; +let reportSource; try { transactionXml = await readFile(transactionPath, "utf8"); @@ -14,6 +16,8 @@ try { throw error; } +reportSource = await readFile(reportPath, "utf8"); + const expectedFragments = [ 'serializer="LCL_OBJECT_TRAN"', "ZTOAD", @@ -33,4 +37,9 @@ for (const fragment of expectedFragments) { ); } -console.log("Repository contract passed: TRAN ZTOAD is serialized for report, WebGUI, and Windows startup."); +assert.ok( + !reportSource.includes("C_DB_EXECUTE"), + "Unsupported native SQL kernel call C_DB_EXECUTE must not exist in src/ztoad.prog.abap", +); + +console.log("Repository contract passed: launcher metadata and forbidden-kernel-call checks are green."); From 6458cd028b2f0aa98cb537040f0d9cf6bb825b1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Emarianfoo=E2=80=9C?= <13335743+marianfoo@users.noreply.github.com> Date: Thu, 6 Aug 2026 14:38:20 +0200 Subject: [PATCH 2/5] test: prove native SQL cannot be disabled safely --- docs/plans/base-sec-002.md | 3 ++- src/ztoad.prog.abap | 35 ++++++++++++++++++++++++++++------- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/docs/plans/base-sec-002.md b/docs/plans/base-sec-002.md index e3f460c..43345d8 100644 --- a/docs/plans/base-sec-002.md +++ b/docs/plans/base-sec-002.md @@ -41,7 +41,8 @@ Remove the externally controlled Native SQL execution boundary and unsupported ` - Baseline: `npm ci` reports 0 vulnerabilities; `npm test` passes with 0 configured abaplint issues; full diagnostic lint reports 1,878 findings across 58 rules. - Red repository contract: `npm test` reached the new focused assertion and failed because `src/ztoad.prog.abap` still contains `C_DB_EXECUTE` (`AssertionError: Unsupported native SQL kernel call C_DB_EXECUTE must not exist`). Configured abaplint remained green with 0 findings before the contract ran. -- ABAP Unit red/green: pending. +- ABAP Unit red: the test-only candidate activated on A4H with the four known warnings. Of 20 tests, 19 passed and only `LTC_COMMAND_PARSER=>CANNOT_REENABLE_NATIVE_SQL` failed (`ASSERT_INITIAL`) because setting the deprecated fallback flag still copied Native SQL into the executable parameter. `REJECTS_NATIVE_SQL_BY_DEFAULT`, UPDATE, and DELETE remained green. Coverage was 15.40% statements, 13.32% branches, and 6.58% procedures. +- ABAP Unit green: pending. - Local final checks: pending. - A4H: pending. - NPL ADT-only: pending. diff --git a/src/ztoad.prog.abap b/src/ztoad.prog.abap index 380fcd8..b5a1061 100644 --- a/src/ztoad.prog.abap +++ b/src/ztoad.prog.abap @@ -5905,7 +5905,8 @@ CLASS ltc_command_parser DEFINITION FINAL METHODS teardown. METHODS parses_update FOR TESTING. METHODS accepts_delete_from FOR TESTING. - METHODS prepares_native_sql FOR TESTING. + METHODS rejects_native_sql_by_default FOR TESTING. + METHODS cannot_reenable_native_sql FOR TESTING. ENDCLASS. CLASS ltc_command_parser IMPLEMENTATION. @@ -5915,7 +5916,7 @@ CLASS ltc_command_parser IMPLEMENTATION. s_customize-auth_insert = '*'. s_customize-auth_update = '*'. s_customize-auth_delete = '*'. - s_customize-auth_native = abap_true. + CLEAR s_customize-auth_native. ENDMETHOD. METHOD teardown. @@ -5958,7 +5959,7 @@ CLASS ltc_command_parser IMPLEMENTATION. cl_abap_unit_assert=>assert_initial( act = no_authority ). ENDMETHOD. - METHOD prepares_native_sql. + METHOD rejects_native_sql_by_default. DATA no_authority TYPE abap_bool. DATA command TYPE string. DATA table TYPE string. @@ -5971,10 +5972,30 @@ CLASS ltc_command_parser IMPLEMENTATION. cl_abap_unit_assert=>assert_equals( act = command exp = c_native_command ). + cl_abap_unit_assert=>assert_initial( act = parameters ). + cl_abap_unit_assert=>assert_true( + act = no_authority + msg = 'Native SQL must be rejected by default' ). + ENDMETHOD. + + METHOD cannot_reenable_native_sql. + DATA no_authority TYPE abap_bool. + DATA command TYPE string. + DATA table TYPE string. + DATA parameters TYPE string. + + s_customize-auth_native = abap_true. + + PERFORM query_parse_noselect + USING `NATIVE DROP INDEX 'ZTEST_INDEX'` + CHANGING no_authority command table parameters. + cl_abap_unit_assert=>assert_equals( - act = parameters - exp = 'DROP INDEX "ZTEST_INDEX"' - msg = 'Native SQL quotes must be converted for the kernel call' ). - cl_abap_unit_assert=>assert_initial( act = no_authority ). + act = command + exp = c_native_command ). + cl_abap_unit_assert=>assert_initial( act = parameters ). + cl_abap_unit_assert=>assert_true( + act = no_authority + msg = 'Legacy configuration must not re-enable Native SQL' ). ENDMETHOD. ENDCLASS. From 5de82713b6998bd663067d4974ea27a24197c446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Emarianfoo=E2=80=9C?= <13335743+marianfoo@users.noreply.github.com> Date: Thu, 6 Aug 2026 14:48:46 +0200 Subject: [PATCH 3/5] fix: retire arbitrary Native SQL execution --- README.md | 13 +- docs/baseline-findings.md | 18 +-- docs/development.md | 2 +- docs/plans/base-sec-002.md | 8 +- .../2026-08-06-base-sec-002-native-sql.md | 8 ++ docs/test-strategy.md | 6 +- src/ztoad.prog.abap | 111 ++---------------- 7 files changed, 42 insertions(+), 124 deletions(-) diff --git a/README.md b/README.md index a946a5c..551a04b 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ ddic tree Tips : You can search a table in the tree using header clic Managed queries -SELECT, INSERT, UPDATE, DELETE, Any native SQL command +SELECT, INSERT, UPDATE, DELETE About New SQL Query Syntax You could use new syntax (if your SAP system manage it) @@ -95,11 +95,7 @@ In this SQL editor, you have 2 ways to do an INSERT : - By passing value of used fields only `INSERT SEOCLASSTX SET CLSNAME = 'ZZMACLASS' DESCRIPT = 'TeSt class'` -Native SQL special syntax -To execute a native SQL command, please add the prefix NATIVE -before your query -`NATIVE CREATE INDEX 'TESTINDEX' ON T001 (MANDT, WAERS, BUKRS)` -`NATIVE DROP INDEX 'TESTINDEX'` +Native SQL is intentionally rejected. Database-specific statements belong in audited database-administration tooling, not in ZTOAD. ## Sample queries @@ -125,14 +121,13 @@ before your query You could define your authorization object to restrict function usage by user. If you dont define auth object, all users will have same access as defined bellow. The auth object have 2 fields TABLE and ACTVT -ACTVT can take 5 values that you could define here. +ACTVT can take 4 values that you could define here. By default : - 01 for INSERT command - 02 for UPDATE command - 03 for SELECT command - 06 for DELETE command -- 16 for EXECUTE NATIVE SQL command - TABLE contain allowed table name pattern The Authorization object name ist `ZTOAD_AUTH`. @@ -162,7 +157,7 @@ No you define globally the authorizations: auth_update TYPE string VALUE space, "'*', * Allow DELETE query on SAP table (restricted by given pattern) auth_delete TYPE string VALUE space, "'*', -* Allow any native sql command (set value to space to disable) +* Deprecated and ignored; Native SQL cannot be enabled auth_native(1) TYPE c VALUE space, "abap_true, ``` diff --git a/docs/baseline-findings.md b/docs/baseline-findings.md index aa9023b..f115fa6 100644 --- a/docs/baseline-findings.md +++ b/docs/baseline-findings.md @@ -1,6 +1,6 @@ # ZTOAD baseline findings -_Snapshot: 2026-08-06 · branch `codex/fix-base-bug-006` · live system A4H client 001, SAP_BASIS 758 SP02 · secondary target NPL client 001, SAP_BASIS 750 SP02_ +_Snapshot: 2026-08-06 · branch `codex/fix-base-sec-002` · live system A4H client 001, SAP_BASIS 758 SP02 · secondary target NPL client 001, SAP_BASIS 750 SP02_ This is the ordered work list for incremental TDD. It records observed defects separately from broad style debt so a new failure cannot disappear inside the legacy backlog. A finding is closed only after its regression test is green locally where possible, green on A4H, and green on the SAP_BASIS 750 target. @@ -9,17 +9,17 @@ This is the ordered work list for incremental TDD. It records observed defects s | Gate | Result | Interpretation | |---|---|---| | Repository `npm test` | Passed, 0 configured abaplint findings | Fast compatibility/XML gate is green | -| Pinned abaplint default profile | 1,878 findings across 58 rules; `master` baseline 1,857 across 57 | Existing debt plus 19 adapter naming and 2 legacy exception-contract findings; reproducible locally, not an immediate all-or-nothing gate | -| A4H SAP syntax | 0 errors, 4 warnings | Program compiles on SAP_BASIS 758 | -| A4H ABAP Unit | 19 passed, 0 failed | Parser, generator, command, line-splitting, and editor-policy tests are green | +| Pinned abaplint default profile | 1,841 findings across 58 rules; pre-fix branch baseline 1,878 | Removing the Native SQL executor reduced diagnostic debt by 37; remaining debt is reproducible locally, not an immediate all-or-nothing gate | +| A4H SAP syntax | 0 errors, 3 warnings | Program compiles on SAP_BASIS 758; the unsupported kernel-call warning is gone | +| A4H ABAP Unit | 20 passed, 0 failed | Parser, generator, command, line-splitting, and editor-policy tests are green | | A4H ATC `S4HANA_READINESS_2023` | Initial run displayed 0 finding rows | Later evidence shows missing prerequisites; this is not an authoritative zero gate | -| A4H ATC `ABAP_CLOUD_READINESS` | 768 findings: 463 priority 1, 305 priority 2 | Current classic report is not ABAP Cloud compatible | +| A4H ATC `ABAP_CLOUD_READINESS` | 759 findings: 457 priority 1, 302 priority 2 | Nine findings removed with the Native SQL sink; current classic report remains non-Cloud-compatible | | A4H WebGUI smoke | Editor startup/input passed; query dispatch blocked | Final editor renders and accepts text without a new dump; installed GUI status `STATUS010` is missing (`BASE-BUG-007`) | | ABAP 7.50 live gate | ARC-1 lifecycle passed; ZTOAD blocked | `arc-1-750` can create/activate/syntax/unit/delete, but ZTOAD's transparent table is absent and SAP_BASIS 750 cannot create it over ADT | -The four normal syntax warnings on the BASE-RUN-001 candidate are POSIX-regex deprecation at lines 1965, 1988, and 2114, plus the unsupported `C_DB_EXECUTE` call at line 4118. +The BASE-RUN-001 candidate had four normal syntax warnings: three POSIX-regex deprecations plus unsupported `C_DB_EXECUTE`. The BASE-SEC-002 candidate removes the kernel call, leaving only the three known regex warnings. -The BASE-BUG-001 parser/generator baseline remains green inside the current 19-test suite. The current `ABAP_CLOUD_READINESS` result is 768 findings (463 P1, 305 P2). The latest `S4HANA_READINESS_2023` run returned no rows but is incomplete because seven prerequisite checks are unavailable. See the [finished BASE-BUG-001 plan](plans/finished/base-bug-001.md) and the [BASE-RUN-001 research](research/2026-08-06-base-run-001-webgui-editor-root-cause.md) for exact evidence. +The BASE-BUG-001 parser/generator baseline remains green inside the current 20-test suite. The current `ABAP_CLOUD_READINESS` result is 759 findings (457 P1, 302 P2). The latest `S4HANA_READINESS_2023` run returned no rows but is incomplete because seven prerequisite checks are unavailable. See the [finished BASE-BUG-001 plan](plans/finished/base-bug-001.md) and the [BASE-SEC-002 research](research/2026-08-06-base-sec-002-native-sql.md) for exact evidence. ## Ordered findings register @@ -29,7 +29,7 @@ Priority meanings: **P0** blocks the requested test workflow or is an immediate |---|---:|---|---|---| | BASE-RUN-001 | P0 | ZTOAD originally dumped in WebGUI through `DP_PUBLISH_URL`; a rejected SQL-mode spike then dumped in `CL_GUI_SOURCEEDIT`. The final adapter uses `CL_GUI_TEXTEDIT` in WebGUI and keeps `CL_GUI_ABAPEDIT` elsewhere. | Two editor-policy Unit tests plus fresh WebGUI launch/input and post-run ST22 delta. | Fixed candidate: 19/19 green, editor renders and accepts input, no new dump; full query dispatch waits on `BASE-BUG-007` | | BASE-SEC-001 | P0 | User text becomes dynamic Open SQL and generated ABAP (`GENERATE SUBROUTINE POOL`, lines 2310 and 3657). Parser-derived table/field/tail tokens are not validated through a strict include list. | Malicious/ambiguous table, column, `WHERE`, `HAVING`, subquery, comment, and quoted-keyword cases; verify rejection before generation. | Open | -| BASE-SEC-002 | P0 | Native SQL uses unsupported kernel call `C_DB_EXECUTE` at line 3818. It is a high-impact arbitrary database-command path and produces a live compiler warning. | Authorization-negative test, default-disabled test, allow-list test against a disposable Z object, and no-kernel-call architecture test. | Open | +| BASE-SEC-002 | P0 | Native SQL used unsupported kernel call `C_DB_EXECUTE`. It was a high-impact arbitrary database-command path and produced a live compiler warning. | Default rejection, rejection despite the deprecated enable flag, preserved UPDATE/DELETE parsing, and a no-kernel-call repository contract. | Fixed candidate: local gates green, A4H 20/20 green and warning removed, read-only startup produced no dump; exact NPL gate prerequisite-blocked because PROG/TABL ZTOAD are absent | | BASE-SEC-003 | P0 | SELECT authorization extraction tokenizes top-level `FROM`/`JOIN` text and can miss nested subqueries/CTEs or concealed data sources. | Multi-table joins, nested subqueries, aliases, comments, quoted identifiers, UNION branches, and unauthorized inner-table cases. | Open | | BASE-BUG-001 | P1 | [Issue #6](https://github.com/marianfoo/ztoad/issues/6): a reported `SELECT DISTINCT ... COUNT ... MAX ... GROUP BY ... HAVING` query produces “The INTO/APPENDING clause must be at the end of the SELECT.” | Sanitized `DD03L` reproduction; check exact generated ordering around `HAVING`, `ORDER BY`, `UP TO`, and `INTO TABLE`. | Fixed and 17/17 green on A4H; live 7.50 pending | | BASE-BUG-002 | P1 | [Issue #7](https://github.com/marianfoo/ztoad/issues/7): a reported `SUM( CASE ... END ) AS ...` over `EKBE` produces “No component exists with the name CASE.” The expression is split into false result components. | Sanitized aggregate with multi-line `CASE`, qualified fields, multiplication, alias, WHERE, and GROUP BY; assert one aggregate expression and the expected generated row type. | Open | @@ -64,7 +64,7 @@ The program now ends with five harmless, short ABAP Unit classes: - `LTC_QUERY_PARSER`: 8 tests for simple SELECT, default/explicit/unlimited limits, tail clauses, UNION separation, comma syntax, caller `INTO` removal, and missing `FROM` rejection. - `LTC_QUERY_GENERATOR`: 3 tests for strict aggregate clause ordering plus escaped-count and legacy-select compatibility. - `LTC_LINE_SPLITTER`: 3 tests for short lines, the 255-character boundary, and long-line splitting. -- `LTC_COMMAND_PARSER`: 3 tests for UPDATE, DELETE FROM, and NATIVE quote conversion. +- `LTC_COMMAND_PARSER`: 4 tests for UPDATE, DELETE FROM, default Native SQL rejection, and rejection despite the deprecated enable flag. - `LTCL_EDITOR_CONFIGURATION`: 2 tests selecting the supported WebGUI text editor while retaining the desktop ABAP editor. These are characterization tests: they make current behavior explicit without claiming that every behavior is correct. For each open bug, add the smallest failing regression test first, then implement the fix, then refactor while all earlier tests remain green. diff --git a/docs/development.md b/docs/development.md index 9887481..849459b 100644 --- a/docs/development.md +++ b/docs/development.md @@ -183,7 +183,7 @@ For every relevant change, verify: - values are bound or safely quoted instead of concatenated where possible; - comments, aliases, nested expressions, subqueries, and unions cannot hide additional statements; - row limits remain enforced unless the user explicitly requests the documented override; -- native SQL remains disabled by default; +- Native SQL remains unconditionally rejected and forbidden sinks such as `C_DB_EXECUTE` do not return; - error/generated-code displays do not leak credentials or confidential values. Run ATC security checks on the live systems. Local abaplint cannot prove runtime authorization or dynamic-SQL safety. diff --git a/docs/plans/base-sec-002.md b/docs/plans/base-sec-002.md index 43345d8..4a4c65f 100644 --- a/docs/plans/base-sec-002.md +++ b/docs/plans/base-sec-002.md @@ -42,9 +42,9 @@ Remove the externally controlled Native SQL execution boundary and unsupported ` - Baseline: `npm ci` reports 0 vulnerabilities; `npm test` passes with 0 configured abaplint issues; full diagnostic lint reports 1,878 findings across 58 rules. - Red repository contract: `npm test` reached the new focused assertion and failed because `src/ztoad.prog.abap` still contains `C_DB_EXECUTE` (`AssertionError: Unsupported native SQL kernel call C_DB_EXECUTE must not exist`). Configured abaplint remained green with 0 findings before the contract ran. - ABAP Unit red: the test-only candidate activated on A4H with the four known warnings. Of 20 tests, 19 passed and only `LTC_COMMAND_PARSER=>CANNOT_REENABLE_NATIVE_SQL` failed (`ASSERT_INITIAL`) because setting the deprecated fallback flag still copied Native SQL into the executable parameter. `REJECTS_NATIVE_SQL_BY_DEFAULT`, UPDATE, and DELETE remained green. Coverage was 15.40% statements, 13.32% branches, and 6.58% procedures. -- ABAP Unit green: pending. -- Local final checks: pending. -- A4H: pending. -- NPL ADT-only: pending. +- ABAP Unit green: the implemented candidate passed all 20 tests on A4H. Coverage was 15.31% statements, 12.90% branches, and 6.67% procedures; the lower totals reflect deletion of the executor form. +- Local final checks: `npm ci` found 0 vulnerabilities; configured abaplint and the repository contract passed; `git diff --check` passed. The full diagnostic inventory fell from 1,878 to 1,841 findings across the same 58 rules. Source searches found no executor form, dispatch, or `C_DB_EXECUTE`; only historical/research references remain. +- A4H: the exact local report source was written through ARC-1 with only its mis-profiled pre-write lint disabled, server preflight retained, and explicit activation. Active syntax has 0 errors and only the 3 known POSIX warnings. Active/inactive main source has no difference. The 7 known inactive child parts remain attributable to `BASE-BUG-007`. `ABAP_CLOUD_READINESS` fell from 768 (463 P1/305 P2) to 759 (457 P1/302 P2). `S4HANA_READINESS_2023` again returned 0 rows but remains non-authoritative because 7 prerequisite checks are unavailable. A fresh FLP/WebGUI transaction start rendered the editor, reproduced only missing `STATUS010`, executed no SQL, and created no ST22 dump after the 09:30:59Z marker. +- NPL ADT-only: the configured ARC-1 1.0.2 profile reached SAP_BASIS 750, but both `PROG ZTOAD` and required `TABL ZTOAD` are absent. Exact activation/syntax/Unit/ATC therefore remains prerequisite-blocked; no GUI fallback or substitute object was used. - First PR CI: pending. - Post-green audit/final CI: pending. diff --git a/docs/research/2026-08-06-base-sec-002-native-sql.md b/docs/research/2026-08-06-base-sec-002-native-sql.md index 94f0f52..f9a0d63 100644 --- a/docs/research/2026-08-06-base-sec-002-native-sql.md +++ b/docs/research/2026-08-06-base-sec-002-native-sql.md @@ -56,3 +56,11 @@ Selected. The feature is already disabled by default, its implementation is unsu - [SQL Injections in Generated Programs](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/ABENSQL_INJ_GEN_PROG_SCRTY.html) - [SQL Injections in Dynamic Tokens](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/ABENSQL_INJ_DYN_TOKENS_SCRTY.html) - [ABAP Database Connectivity](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/ABENADBC.html) + +## Validation result + +The focused repository assertion and live ABAP Unit test both failed against the old implementation before production code changed. The final implementation removes the dispatch and executor form, rejects `NATIVE` in `QUERY_PARSE_NOSELECT`, and retains the legacy configuration fields only as ignored layout members. + +On A4H/SAP_BASIS 758, explicit activation and active syntax completed with zero errors and three known POSIX warnings; the prior `C_DB_EXECUTE` warning disappeared. All 20 ABAP Unit tests passed. `ABAP_CLOUD_READINESS` improved from 768 findings (463 P1, 305 P2) to 759 (457 P1, 302 P2). Active and inactive main report source had no difference; the seven existing inactive screen/status/text child parts remain `BASE-BUG-007`. A fresh FLP transaction start rendered the editor, reported only missing `STATUS010`, and produced no ST22 delta. No SQL was executed. + +The ARC-1 1.0.2 ADT-only probe reached NPL/SAP_BASIS 750 and confirmed that both `PROG ZTOAD` and required `TABL ZTOAD` are absent. Exact 7.50 validation therefore remains prerequisite-blocked without using a GUI or an unfaithful substitute. diff --git a/docs/test-strategy.md b/docs/test-strategy.md index 2906eb6..3ff9280 100644 --- a/docs/test-strategy.md +++ b/docs/test-strategy.md @@ -54,7 +54,7 @@ Each parser/generator change should select relevant cases from this matrix: | Set operations | UNION, UNION ALL, branch layout mismatch, limits/order in branches | | Limits | default, explicit positive, zero/unlimited, invalid/overflow, policy maximum | | DML | INSERT values/set, UPDATE, DELETE, conversion errors, authorization denial; disposable Z table only | -| Native SQL | disabled default, authorization denial, strict allow list, unsupported operation rejection; never business data | +| Native SQL | rejected by default, cannot be re-enabled by legacy configuration, forbidden executor absent | | Error handling | parse rejection, compile rejection, runtime exception, sanitized message, no unexpected ST22 dump | ## Live test protocol @@ -89,7 +89,7 @@ For GUI-control changes, a green policy Unit test proves only the selection deci ## Database-writing integration tests -No normal smoke or unit test may modify SAP or business tables. A test of INSERT/UPDATE/DELETE/native behavior requires all of the following: +No normal smoke or unit test may modify SAP or business tables. A test of INSERT/UPDATE/DELETE behavior requires all of the following: - an explicitly disposable Z table in the test package; - a dedicated test user/role with no broad wildcard access; @@ -99,7 +99,7 @@ No normal smoke or unit test may modify SAP or business tables. A test of INSERT - a pre-test and post-test row-count assertion; - a recovery procedure if cleanup fails. -Native SQL remains disabled unless the test specifically targets its replacement/security policy and has explicit maintainer approval. +Native SQL is retired and must remain rejected before generation or execution. ## Release acceptance diff --git a/src/ztoad.prog.abap b/src/ztoad.prog.abap index b5a1061..e529f03 100644 --- a/src/ztoad.prog.abap +++ b/src/ztoad.prog.abap @@ -41,7 +41,7 @@ *& Tips : You can search a table in the tree using header clic *& *3 Managed queries -*& SELECT, INSERT, UPDATE, DELETE, Any native SQL command +*& SELECT, INSERT, UPDATE, DELETE *& *3 About New SQL Query Syntax *& You could use new syntax (if your SAP system manage it) @@ -74,11 +74,9 @@ *& - By passing value of used fields only *E INSERT SEOCLASSTX SET CLSNAME = 'ZZMACLASS' DESCRIPT = 'TeSt class' *& -*3 Native SQL special syntax -*& To execute a native SQL command, please add the prefix NATIVE -*& before your query -*& NATIVE CREATE INDEX 'TESTINDEX' ON T001 (MANDT, WAERS, BUKRS) -*& NATIVE DROP INDEX 'TESTINDEX' +*3 Native SQL +*& Native SQL is intentionally rejected. Use audited database +*& administration tooling for database-specific statements. *& *3 Sample of query : *& @@ -218,12 +216,11 @@ DATA : BEGIN OF s_customize, "#EC NEEDED * If you dont define auth object, all users will have same access as * defined bellow * The auth object have 2 fields TABLE and ACTVT -* ACTVT can take 5 values that you could define here. By default : +* ACTVT can take 4 values that you could define here. By default : * 01 for INSERT command * 02 for UPDATE command * 03 for SELECT command * 06 for DELETE command -* 16 for EXECUTE NATIVE SQL command * TABLE contain allowed table name pattern * '*' to allow all table, 'Z*' to allow all specific tables... auth_object(20) TYPE c VALUE 'ZTOAD_AUTH', @@ -231,6 +228,7 @@ DATA : BEGIN OF s_customize, "#EC NEEDED actvt_insert TYPE tactt-actvt VALUE '01', actvt_update TYPE tactt-actvt VALUE '02', actvt_delete TYPE tactt-actvt VALUE '06', +* Deprecated and ignored; retained to avoid changing the legacy layout actvt_native TYPE tactt-actvt VALUE '16', * Bellow is default AUTH used if no auth_object is defined @@ -242,7 +240,7 @@ DATA : BEGIN OF s_customize, "#EC NEEDED auth_update TYPE string VALUE space, "'*', * Allow DELETE query on SAP table (restricted by given pattern) auth_delete TYPE string VALUE space, "'*', -* Allow any native sql command (set value to space to disable) +* Deprecated and ignored; Native SQL cannot be enabled auth_native(1) TYPE c VALUE space, "abap_true, END OF s_customize. @@ -1594,13 +1592,6 @@ FORM query_process USING fw_display TYPE c RETURN. ENDIF. -* For native sql command, execute it directly - IF lw_command = c_native_command. - PERFORM ddic_set_tree USING lw_from. - PERFORM query_process_native USING lw_where. - RETURN. - ENDIF. - * For other no select command, generate program IF w_run LT c_query_max_exec. PERFORM query_generate_noselect USING lw_command lw_from @@ -3701,22 +3692,11 @@ FORM query_parse_noselect USING fw_query TYPE string ENDIF. WHEN c_native_command. - IF s_customize-auth_object NE space. - AUTHORITY-CHECK OBJECT s_customize-auth_object - ID 'ACTVT' FIELD s_customize-actvt_native. - ELSEIF s_customize-auth_native NE abap_true. - sy-subrc = 4. - ENDIF. - IF sy-subrc NE 0. - CONCATENATE 'SQL command not allowed :'(m25) fw_command - INTO lw_query. - MESSAGE lw_query TYPE c_msg_success DISPLAY LIKE c_msg_error. - fw_noauth = abap_true. - RETURN. - ENDIF. -* For native command, replace ' by " - TRANSLATE lw_query USING '''"'. - fw_param = lw_query. + CONCATENATE 'SQL command not allowed :'(m25) fw_command + INTO lw_query. + MESSAGE lw_query TYPE c_msg_success DISPLAY LIKE c_msg_error. + fw_noauth = abap_true. + RETURN. WHEN OTHERS. CONCATENATE 'SQL command not allowed :'(m25) fw_command @@ -4073,71 +4053,6 @@ FORM editor_paste USING fw_text TYPE string MESSAGE lw_message TYPE c_msg_success. ENDFORM. " EDITOR_PASTE -*&---------------------------------------------------------------------* -*& Form QUERY_PROCESS_NATIVE -*&---------------------------------------------------------------------* -* Execute a given native sql command -*----------------------------------------------------------------------* -* -->FW_COMMAND Native SQL Command to execute -*----------------------------------------------------------------------* -FORM query_process_native USING fw_command TYPE string. - DATA : lw_lines TYPE i, - lw_sql_code TYPE i, - lw_sql_msg(255) TYPE c, - lw_row_num TYPE i, - lw_command(255) TYPE c, - lw_msg TYPE string, - lw_timestart TYPE timestampl, - lw_timeend TYPE timestampl, - lw_time TYPE p LENGTH 8 DECIMALS 2, - lw_charnumb(12) TYPE c, - lw_answer(1) TYPE c. - -* Have a user confirmation before execute Native SQL Command - CONCATENATE 'Are you sure you want to do a'(m31) fw_command - '?'(m33) - INTO lw_msg SEPARATED BY space. - CALL FUNCTION 'POPUP_TO_CONFIRM' - EXPORTING - titlebar = 'Warning : critical operation'(t04) - text_question = lw_msg - default_button = '2' - display_cancel_button = space - IMPORTING - answer = lw_answer - EXCEPTIONS - text_not_found = 1 - OTHERS = 2. - IF sy-subrc NE 0 OR lw_answer NE '1'. - RETURN. - ENDIF. - - lw_command = fw_command. - lw_lines = strlen( lw_command ). - GET TIME STAMP FIELD lw_timestart. - CALL 'C_DB_EXECUTE' - ID 'STATLEN' FIELD lw_lines - ID 'STATTXT' FIELD lw_command - ID 'SQLERR' FIELD lw_sql_code - ID 'ERRTXT' FIELD lw_sql_msg - ID 'ROWNUM' FIELD lw_row_num. - IF sy-subrc NE 0. - MESSAGE lw_sql_msg TYPE c_msg_success DISPLAY LIKE c_msg_error. - RETURN. - ELSE. - GET TIME STAMP FIELD lw_timeend. - lw_time = cl_abap_tstmp=>subtract( - tstmp1 = lw_timeend - tstmp2 = lw_timestart - ). - lw_charnumb = lw_time. - CONCATENATE 'Query executed in'(m09) lw_charnumb 'seconds.'(m10) - INTO lw_msg SEPARATED BY space. - CONDENSE lw_msg. - MESSAGE lw_msg TYPE c_msg_success. - ENDIF. -ENDFORM. " QUERY_PROCESS_NATIVE - *&---------------------------------------------------------------------* *& Form ddic_add_tree_zspro *&---------------------------------------------------------------------* @@ -4449,7 +4364,7 @@ FORM ddic_refresh_tree. PERFORM query_parse_noselect USING lw_query CHANGING lw_noauth lw_select lw_from lw_where. - IF lw_noauth NE space OR lw_select = c_native_command. + IF lw_noauth NE space. RETURN. ENDIF. ENDIF. From 8b4091ceb101dd722b71430ff691d6d33c85e8eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Emarianfoo=E2=80=9C?= <13335743+marianfoo@users.noreply.github.com> Date: Thu, 6 Aug 2026 14:50:27 +0200 Subject: [PATCH 4/5] docs: close BASE-SEC-002 workflow --- .github/pull_request_template.md | 1 + AGENTS.md | 4 +++- docs/development.md | 4 +++- docs/plans/{ => finished}/base-sec-002.md | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) rename docs/plans/{ => finished}/base-sec-002.md (92%) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 96487aa..81c875e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -20,6 +20,7 @@ - [ ] Authorization and SQL-injection implications were reviewed. - [ ] New or changed logic has ABAP Unit coverage where technically feasible. - [ ] Documentation and changelog impact were considered. +- [ ] The accepted PR will use squash merge and a Conventional Commit PR title. ## Test evidence / exceptions diff --git a/AGENTS.md b/AGENTS.md index 4e8d9cc..5685e68 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -30,7 +30,7 @@ For changes that affect `src/` or live behavior: 7. On SAP_BASIS 750 first when available, then S/4HANA 2023, require controlled activation, active syntax, all ABAP Unit tests, and complete ATC runs or explicit prerequisite failures. An ARC-1 write acknowledgement or `activate=true` request is not activation evidence: call activation explicitly, require active/inactive main-object equality, and query inactive child parts (including screens, GUI statuses, text elements, and includes) for every changed composite object. Main-source equality alone is not a pass when a child part remains inactive. Run a fresh-session safe browser smoke and ST22 delta on A4H only. A failed/unavailable gate is never a pass. 8. Perform a final implementation review, update finding evidence, commit with a Conventional Commit subject, push the branch, open a pull request, and wait for required CI to become green. 9. After the first green PR run, audit the plan, implementation, test evidence, CI output, and development process. Apply useful process/documentation improvements to the same PR, move its plan to `docs/plans/finished/`, push, and wait for CI again. -10. Merge only after the maintainer accepts any recorded live-system limitations. Pull the resulting `master`, verify Release Please behavior, and do not manually tag an ordinary release. +10. Merge only after the maintainer accepts any recorded live-system limitations. Use GitHub's squash merge so the reviewed PR lands as one Conventional Commit; do not expose red/green/audit workflow commits on `master`. Pull the resulting `master`, verify Release Please behavior, and do not manually tag an ordinary release. For a source-only candidate, a controlled direct source deployment is preferable to switching the shared native-abapGit repository away from `master`. Record the candidate commit/hash and activate only the intended object. Structural changes still require a real native-abapGit round trip and may need a dedicated package/system to avoid changing shared objects underneath other work. @@ -38,6 +38,8 @@ For a coordinated structural-object round trip, refresh native abapGit before st If ARC-1's pre-write linter selects the wrong ABAP release, bypass only that local lint step after the repository's pinned abaplint gate is green. Keep server preflight, explicit activation, SAP syntax, Unit, ATC, and object-state verification enabled, and record the tooling mismatch in the findings register. +ZTOAD's report source is large enough that streaming a complete `SAPWrite` JSON payload through stdin can return `EAGAIN`. If that occurs, create a bounded temporary JSON payload file, pass its path to ARC-1, and verify the subsequent write before activation; never interpret the failed streamed request as a deployed candidate. Capture very large ATC JSON to a temporary file and emit an exact count/priority/prerequisite summary so terminal truncation cannot corrupt the evidence. + If ARC-1 authentication or a live system is unavailable, local checks may continue, but do not claim live validation. Record the missing gate in the PR and complete it before merge unless the maintainer explicitly accepts the risk. NPL currently lacks ZTOAD's transparent table. SAP_BASIS 750 has no ADT transparent-table create endpoint, so ARC-1 cannot provision it safely. Never substitute a DDIC structure. Until the real table is provisioned outside the ADT-only workflow, record NPL ZTOAD activation/syntax/Unit/ATC as blocked even though the ARC-1 object lifecycle itself is proven usable. diff --git a/docs/development.md b/docs/development.md index 849459b..ce53cc1 100644 --- a/docs/development.md +++ b/docs/development.md @@ -73,7 +73,7 @@ Do not manually install only the report source. That omits the dynpros, table, a 7. Deploy the exact candidate source to SAP_BASIS 750 first through ARC-1/ADT when its real dependencies exist; record any missing ADT prerequisite as blocked. Keep the A4H native-abapGit link on `master` and record an unmerged candidate as a direct deployment. Follow every write with an explicit activation call, active/inactive main-object comparison, and an inactive-child-part query for affected composite objects; a write response, activation option, or equal main-source hash alone does not prove that screens, statuses, texts, and includes are active. 8. On NPL, activate only the intended object and run active syntax, all ABAP Unit tests, and complete ATC variants through ARC-1. On A4H/SAP_BASIS 758, repeat those checks and additionally start a fresh browser session for safe smoke and ST22 delta. Verify required dynpros/GUI statuses before attributing an end-to-end failure to the source candidate. 9. If a correction must be made in SAP, export it through native abapGit or reproduce it locally, then review every serialized/source difference. Never leave an unexported system-only fix. -10. Perform a final review, update evidence, commit/push the short-lived branch, open the PR, and wait for CI. After the first green run, audit the process/CI, update guidance in the same PR, move the plan to `docs/plans/finished/`, push, and wait again. +10. Perform a final review, update evidence, commit/push the short-lived branch, open the PR, and wait for CI. After the first green run, audit the process/CI, update guidance in the same PR, move the plan to `docs/plans/finished/`, push, and wait again. After maintainer acceptance, use GitHub's squash merge so the PR lands as one Conventional Commit even though its branch preserves red/green/audit history. Always test 7.50 first when the destination and the candidate's real dependencies are available. A change that uses newer syntax may appear correct on 2023 yet be impossible to activate on the compatibility floor. The `arc-1-750` profile and ADT lifecycle are configured and proven; exact ZTOAD validation remains blocked while transparent table `ZTOAD` is absent because SAP_BASIS 750 cannot create transparent tables over ADT. See [the NPL dossier](research/2026-08-06-npl-adt-only-validation.md). @@ -81,6 +81,8 @@ Native abapGit branch switching changes real system objects, and abapGit Flow re If ARC-1's pre-write linter reports an incorrect ABAP release, do not weaken all write checks. After the pinned repository abaplint gate passes, disable only the mis-profiled local lint request, retain server preflight, activate explicitly, and run SAP syntax/Unit/ATC/object-state checks. Track the tool mismatch separately from the product change. +For the large ZTOAD report, an ARC-1 stdin write can fail with `EAGAIN` before SAP receives the source. Retry through a bounded temporary JSON payload file, then require a successful write response and explicit activation. Large ATC result JSON can exceed terminal output limits; capture the complete result first and derive exact finding counts, priority counts, and prerequisite errors from that complete payload rather than parsing truncated console text. + ## 5. Structural object changes Examples include adding issue #2's transaction code, changing the table definition, changing dynpros or text elements, and adding a global class. diff --git a/docs/plans/base-sec-002.md b/docs/plans/finished/base-sec-002.md similarity index 92% rename from docs/plans/base-sec-002.md rename to docs/plans/finished/base-sec-002.md index 4a4c65f..6ba493b 100644 --- a/docs/plans/base-sec-002.md +++ b/docs/plans/finished/base-sec-002.md @@ -46,5 +46,5 @@ Remove the externally controlled Native SQL execution boundary and unsupported ` - Local final checks: `npm ci` found 0 vulnerabilities; configured abaplint and the repository contract passed; `git diff --check` passed. The full diagnostic inventory fell from 1,878 to 1,841 findings across the same 58 rules. Source searches found no executor form, dispatch, or `C_DB_EXECUTE`; only historical/research references remain. - A4H: the exact local report source was written through ARC-1 with only its mis-profiled pre-write lint disabled, server preflight retained, and explicit activation. Active syntax has 0 errors and only the 3 known POSIX warnings. Active/inactive main source has no difference. The 7 known inactive child parts remain attributable to `BASE-BUG-007`. `ABAP_CLOUD_READINESS` fell from 768 (463 P1/305 P2) to 759 (457 P1/302 P2). `S4HANA_READINESS_2023` again returned 0 rows but remains non-authoritative because 7 prerequisite checks are unavailable. A fresh FLP/WebGUI transaction start rendered the editor, reproduced only missing `STATUS010`, executed no SQL, and created no ST22 dump after the 09:30:59Z marker. - NPL ADT-only: the configured ARC-1 1.0.2 profile reached SAP_BASIS 750, but both `PROG ZTOAD` and required `TABL ZTOAD` are absent. Exact activation/syntax/Unit/ATC therefore remains prerequisite-blocked; no GUI fallback or substitute object was used. -- First PR CI: pending. -- Post-green audit/final CI: pending. +- First PR CI: PR #18 passed required `Repository quality (ABAP 7.50)` and external abaplint checks. +- Post-green audit: repository settings now permit squash merge only after accidental merge commits on earlier PRs exposed workflow commits. `AGENTS.md`, `docs/development.md`, and the PR template now require squash merge. The guidance also records the observed large-report stdin `EAGAIN` recovery and complete-result ATC summarization requirement. Final CI is pending after this audit commit. From 28c7398f9a36c8f9a4853231cf150b1ea2e611a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Emarianfoo=E2=80=9C?= <13335743+marianfoo@users.noreply.github.com> Date: Thu, 6 Aug 2026 14:51:17 +0200 Subject: [PATCH 5/5] docs: record final BASE-SEC-002 CI --- docs/plans/finished/base-sec-002.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/plans/finished/base-sec-002.md b/docs/plans/finished/base-sec-002.md index 6ba493b..7e5232b 100644 --- a/docs/plans/finished/base-sec-002.md +++ b/docs/plans/finished/base-sec-002.md @@ -47,4 +47,4 @@ Remove the externally controlled Native SQL execution boundary and unsupported ` - A4H: the exact local report source was written through ARC-1 with only its mis-profiled pre-write lint disabled, server preflight retained, and explicit activation. Active syntax has 0 errors and only the 3 known POSIX warnings. Active/inactive main source has no difference. The 7 known inactive child parts remain attributable to `BASE-BUG-007`. `ABAP_CLOUD_READINESS` fell from 768 (463 P1/305 P2) to 759 (457 P1/302 P2). `S4HANA_READINESS_2023` again returned 0 rows but remains non-authoritative because 7 prerequisite checks are unavailable. A fresh FLP/WebGUI transaction start rendered the editor, reproduced only missing `STATUS010`, executed no SQL, and created no ST22 dump after the 09:30:59Z marker. - NPL ADT-only: the configured ARC-1 1.0.2 profile reached SAP_BASIS 750, but both `PROG ZTOAD` and required `TABL ZTOAD` are absent. Exact activation/syntax/Unit/ATC therefore remains prerequisite-blocked; no GUI fallback or substitute object was used. - First PR CI: PR #18 passed required `Repository quality (ABAP 7.50)` and external abaplint checks. -- Post-green audit: repository settings now permit squash merge only after accidental merge commits on earlier PRs exposed workflow commits. `AGENTS.md`, `docs/development.md`, and the PR template now require squash merge. The guidance also records the observed large-report stdin `EAGAIN` recovery and complete-result ATC summarization requirement. Final CI is pending after this audit commit. +- Post-green audit: repository settings now permit squash merge only after accidental merge commits on earlier PRs exposed workflow commits. `AGENTS.md`, `docs/development.md`, and the PR template now require squash merge. The guidance also records the observed large-report stdin `EAGAIN` recovery and complete-result ATC summarization requirement. The post-audit run `31103159862` passed repository quality and abaplint; a final documentation-only run verifies this evidence update.