What a customer security / Basis team needs to know before letting an AI assistant drive SAP through these plugins: what the AI's SAP user must be allowed to do, how credentials are handled, what the SAP GUI Security trust rule means, and which write-safety controls are enforced where.
Everything below runs on the developer's Windows workstation against SAP via the standard GUI Scripting and RFC interfaces, under the developer's own Dialog user. The skills make no cloud calls of their own and cache no SAP data off the workstation.
Grant the AI's SAP user a normal developer role on DEV, scoped to the customer namespace. The table maps plugin capability to the authorization objects involved:
| Capability (skills) | Authorization objects (key fields) |
|---|---|
ABAP Workbench create/change/activate — /sap-se38 /sap-se37 /sap-se24 /sap-se11 /sap-se91 /sap-function-group /sap-se41 /sap-se51 /sap-se54 /sap-cmod /sap-se19 /sap-activate-object /sap-check-fix |
S_DEVELOP (ACTVT 01/02/03; OBJTYPE PROG/FUGR/CLAS/INTF/DOMA/DTEL/TABL/VIEW/TTYP/SHLP/ENQU/MSAG/DYNP…; DEVCLASS = your Z*/Y* packages), S_TCODE for the transactions used |
Packages — /sap-se21 /sap-change-package |
S_DEVELOP (OBJTYPE DEVC), S_TCODE SE21/SE80 |
Transports create/release — /sap-transport-request /sap-se01 |
S_TRANSPRT (TTYPE DTRA/TASK; ACTVT 01/02/03 + 43 release), S_TCODE SE01/SE09/SE10 |
Transport import — /sap-stms |
S_CTS_ADMI (import functions) + STMS tcodes; production imports additionally pass the skill's typed-SID gate |
Number ranges — /sap-snro |
S_NUMBER, S_TCODE SNRO |
Table reads — /sap-se16n, diagnose readers |
S_TABU_DIS / S_TABU_NAM for the read tables (SE16N), S_TCODE SE16N/SM12/SM13/SM37/ST22/SLG1/ST05 |
Table maintenance — /sap-update-addon |
S_TABU_DIS/S_TABU_NAM maintenance on the Z/Y tables, SM30 tcode where a view exists |
ATC / Code Inspector — /sap-atc, migrate analyze |
S_DEVELOP (display), SCI/ATC tcodes (SCI, SCICM, ATC monitor); central ATC additionally needs the hub trust/RFC setup |
ABAP Unit — /sap-run-abap-unit, /sap-gen-abap-unit |
S_DEVELOP on the tested objects (unit tests execute the code under test) |
| RFC calls (verification gates, lookups, wrapper) | S_RFC (ACTVT 16) for the function groups behind RFC_READ_TABLE, RFC_SYSTEM_INFO, RPY_*, DDIF_*, CTS_API_*, and (after /sap-dev-init) the Z wrapper's function group; plus S_TCODE free RFC logon |
| GUI file transfer (source upload/download, SE16N export) | S_GUI (ACTVT 61) |
Spool — /sap-sp02 |
S_SPO_ACT on own spool requests |
Practical notes:
- Exact field values are release- and policy-specific. Derive the final
role the standard way: run a pilot with a wider dev role, capture
STAUTHTRACE/ST01traces while exercising the skills you'll use, and cut the role from the trace. After any authorization failure,SU53on the AI's user shows the missing object. /sap-doctorprobes authorizations mechanically (auth group, Step 3b):references/sap_doctor_authz_probe.ps1reads the machine-readable probe set —sap-dev-core/shared/tables/required_authorizations.tsv— and callsSUSR_USER_AUTH_FOR_OBJ_GET(RFC-enabled; no dev-init wrapper needed) for the logged-in user, emittingAUTH: PASS|FAIL <capability>. Relationship of the two: the table above is a coarse core-developer summary (a dozen rows, the objects a human reviewer asks about first); the TSV is the comprehensive per-capability probe set across all four plugins — a large superset with finer granularity, and the source of truth for what/sap-doctoractually checks. When you add a capability, extend the TSV; update this table only when the change matters at the summary level. This table + SU53 remains the authoritative contract for the exact, release-specific field values (the probe checks the representative object/fields per capability).- Recommendation: give the AI a dedicated, personal-but-separate Dialog
user (e.g.
DEV_AI_<initials>) on DEV only. That makes every SAP change attributable to the AI-assisted workflow in standard SAP audit trails (version management, transport ownership, SM20 where enabled), and lets you revoke it independently.
- At rest:
connections.jsonunder{work_dir}\runtime\storessap_passwordDPAPI-encrypted (dpapi:<base64>, CurrentUser scope). A copied file is useless on another machine/account. Plaintext values are accepted for migration but trigger a re-save prompt. - In flight: SAP GUI and NCo need the plaintext at logon, so
/sap-logingenerates a runner in the per-run scratch dir ({RUN_TEMP}) with the decrypted value substituted. The runner deletes the password-bearing files in afinallyblock in the same process (crash of the login still cleans up), Step 5 sweeps again, and every later/sap-loginremoves any10-minute-old residue a hard process kill might have left. Never copy these files out of
{RUN_TEMP}. - In logs: the structured loggers redact
sap_password/password/token/secret… by key (log_redact_keys), recursively. - The password is never echoed into the conversation, and never stored anywhere server-side.
SAP GUI raises a per-program security dialog for file reads/writes a script
triggers. Because SAP keys "Remember my decision" on the individual program
dynpro, freshly generated programs would raise the dialog forever. So
/sap-dev-init Step 1b writes ONE broad rule into
%APPDATA%\SAP\Common\saprules.xml:
- Scope: read/write limited to
{work_dir}(the plugin's sandbox directory) — NOT the whole filesystem. - Context: any system/client/program by default. This is deliberate: the rule is path-scoped, and the same workstation sandbox serves every SAP system the developer works on. It is also flagged as a security-weakening action, so the operator explicitly approves it once.
- Least-privilege option: pass
-System <SID> -Client <nnn>tosap_gui_security_grant.ps1to pin the rule per system; you then re-grant per SID. - Audit/revoke: the rule is plain XML in
saprules.xml(also visible under SAP GUI Options > Security > Security Configuration); delete the{work_dir}rule to revoke. SAP Logon must restart to pick up external edits.
| Rule | Where enforced |
|---|---|
| No direct SQL writes on SAP standard tables (Z/Y only; reads always allowed) | shared/rules/skill_operating_rules.md contract for the AI + no skill ships such a write path; TADIR cleanup goes through SAP's own TR_TADIR_INTERFACE API with a definition-gone guard that refuses live objects |
| No unsolicited deployments | Operating-rules contract + the Claude Code permission layer: live SAP writes are write-classified tool calls the harness surfaces for approval in non-auto modes |
| Destructive operations confirm first | In-skill: delete flows (SE01/SE11/SE21/SE24/SE37/SE38/function-group) require explicit user confirmation; TR release shows the object inventory first; STMS production import gates on a typed SID |
| Migration campaign human gates | In code: /sap-cc-campaign next refuses (BLOCKED, exit 3) until the scope sign-off is recorded; /sap-cc-remediate record refuses until the dry-run review sign-off is recorded |
| Quality gates before deploy | ATC gate fails loud on parse/scope problems (never silently 0 findings); post-activate RFC verification + SE38 content verification catch silent deploy failures |
| Dev-environment teardown safety | /sap-dev-clean validates the anchor (wrapper FM → TADIR truth) and ABORTS on mismatch rather than deleting the wrong package/TR |
Honest boundary: the operating rules are a workstation-side contract (prompt + harness permissions + in-skill guards), not a server-side control. The SAP-side control remains the authorization concept — which is why the dedicated, DEV-only AI user in §1 is the recommendation.
- All processing is local: workstation ⇄ SAP via SAP GUI Scripting / NCo RFC.
Design specs, generated ABAP, logs, and artifacts live under
{work_dir}. - Structured JSONL logs (
{work_dir}\logs) record every skill run withrun_idchaining and a stable failure vocabulary (shared/rules/error_classes.md) — suitable for SIEM/dashboard ingestion. /sap-evidence-packbundles the per-change artifacts (checks, ATC results, unit runs, approvals) for audit hand-off.- On the SAP side, every change is a normal transported change under the AI user's name — version management and transport logs apply unchanged.
- Create the dedicated AI Dialog user on DEV; assign the role derived from §1
(start wide on a sandbox, cut from
STAUTHTRACE). - Confirm
sapgui/user_scripting = TRUEis acceptable on DEV (and only DEV, if policy demands; the plugins do not need it on PRD —/sap-stmsPRD imports are the only PRD-facing action and are RFC/GUI on the domain controller with a typed-SID gate). - Review the
{work_dir}saprules.xml grant; narrow per-system if required. - Verify DPAPI credential storage meets policy (or have operators type the password per session — DPAPI save is opt-in).
- Set
log_retention_days/ redaction keys to policy; pointlog_dirat a collected location if you ingest logs. - Decide the Claude Code permission mode for live SAP writes (interactive approval vs. allowlisted).