Back to skill

Security audit

SAP Integration Suite

Security checks for vulnerabilities and agentic risk

Overview

The skill is for SAP integration, but it exposes broad SAP read/write capabilities and local exports without enough scoping or user safety controls.

Install only for authorized SAP administrators or developers working in controlled SAP environments. Use least-privilege SAP accounts, avoid production unless change-approved, restrict which tables/functions can be used, protect credential files, and treat any JSON or Excel outputs as sensitive enterprise data.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (5)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/rfc_function_caller.py:80
Finding

Arbitrary SAP RFC Function Execution Without an Allowlist

Content
View full analysis
Dict[str, Any]: """ Execute SAP function module with parameters Args: function_name: Name of RFC function module parameters: Dictionary of input parameters save_result: Whether to save result to file output_file: Custom output filename Returns: Dictionary containing function result """ try: print(f"🔄 Calling function: {function_name}") # Execute function call if parameters: result = self.conn.call(function_name, **parameters) else: result = self.conn.call(function_name) print(f"✅ Function executed successfully") # Save result if requested if save_result or output_file: filename = output_file or f"{function_name}_{datetime.now().strftime('%Y%m%d_%H%M%S')}.json" self.save_result(result, filename) return result except Exception as e: print(f"❌ Error calling function {function_name}: {str(e)}") return {} ``` ```python else: # Direct function call mode function_name = sys.argv[2] parameters = {} # Load parameters from file if provided if len(sys.argv) > 3: try: with open(sys.argv[3], 'r') as f: parameters = json.load(f) except Exception as e: print(f"❌ Error loading parameters: {str(e)}") sys.exit(1) # Execute function result = caller.call_function(function_name, parameters, save_result=True) if result: print(f"\n📋 Function Result:") print(caller.format_result(result)) ``` ### ...[truncated 1924 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/sap_data_extractor.py:26
Finding

Arbitrary SAP Table Extraction Without Table or Field Restrictions

Content
View full analysis
pd.DataFrame: """ Extract data from any SAP table using RFC_READ_TABLE Args: table_name: SAP table name (e.g., 'KNA1', 'VBAK', 'MARA') fields: List of fields to extract (None = all fields) where_clause: SQL WHERE clause condition max_rows: Maximum number of rows to extract Returns: pandas DataFrame with extracted data """ try: # Prepare RFC call parameters params = { 'QUERY_TABLE': table_name, 'DELIMITER': '|', 'ROWCOUNT': max_rows } # Add field selection if specified if fields: field_list = [{'FIELDNAME': field} for field in fields] params['FIELDS'] = field_list # Add WHERE clause if specified if where_clause: # Split long WHERE clauses into 72-character chunks where_parts = [] for i in range(0, len(where_clause), 72): where_parts.append({'TEXT': where_clause[i:i+72]}) params['OPTIONS'] = where_parts print(f"🔄 Extracting data from table {table_name}...") # Execute RFC call result = self.conn.call('RFC_READ_TABLE', **params) ``` ```python if table_name: # Extract specific table data = extractor.extract_table_data(table_name) if not data.empty: print(f"\n📊 Sample data from {table_name}:") print(data.head()) print(f"\nTotal rows: {len(data)}") # Export if filename provided if output_file: extractor.export_to_excel(data, output_file, table_name) ``` ### Technical ...[truncated 1848 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/rfc_function_caller.py:175
Finding

Sensitive RFC Results Are Automatically Stored in Plaintext JSON Files

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/sap_data_extractor.py:166
Finding

Extracted SAP Records Are Exported to Unencrypted Excel Files

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/hana-integration.md:11
Finding

HANA Connection Examples Encourage Privileged SYSTEM Access Without Explicit TLS Enforcement

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

This script is explicitly designed to execute any RFC-enabled SAP function module and exposes that capability through direct CLI and interactive modes without any allowlist, authorization gating, or restriction to read-only operations. In an enterprise SAP environment, many RFCs are state-changing or administrative, so this creates a powerful execution primitive that can be abused for data modification, user/role changes, job execution, or destructive business operations if the tool is run with a privileged SAP account.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill description is scoped very broadly to essentially any SAP-related development, integration, extraction, reporting, and automation task. In an agent environment, this can cause the skill to activate in contexts involving sensitive enterprise systems or data exports without enough narrowing, review gates, or user warnings, increasing the chance of inappropriate data access or risky automation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill advertises SAP data extraction, reporting, export to Excel/CSV, and real-time sync without warning that these operations may expose regulated or business-critical enterprise data. Because SAP commonly contains HR, finance, vendor, and customer records, omitting cautionary guidance makes unsafe use more likely, especially when paired with automation and broad integration capabilities.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The guide presents execution of sapinst as part of the technical migration steps, which can make significant changes to an SAP system. In this markdown section, there is no nearby warning about running it only in a planned migration window, validating backups, or using non-production/test environments first.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The example uses BAPI_CUSTOMER_CREATEFROMDATA1 to create customer records in the destination system, which directly affects business master data. The surrounding markdown does not warn readers that this operation can create or duplicate records and should be validated, tested, and access-controlled before use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The custom object migration example inserts rows into ztable_new and commits them with COMMIT WORK, making persistent changes to SAP data. The document does not disclose the risk of irreversible writes, the need for transaction safeguards, or the importance of backup/rollback planning.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The performance optimization section includes ALTER SYSTEM ... WITH RECONFIGURE, UPDATE STATISTICS, and MERGE DELTA, all of which can affect database behavior and performance. There is no accompanying warning that these commands should be reviewed by qualified administrators and scheduled carefully to avoid production impact.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The tool encourages arbitrary RFC invocation but provides no safety prompt, risk classification, or confirmation before executing unknown SAP function modules. Because SAP RFCs may trigger writes, workflow actions, or administrative changes, users can inadvertently execute destructive operations, especially in interactive mode where arbitrary function names are accepted.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script saves raw SAP function results directly to JSON files, potentially including customer, material, user, or system information, without sanitization, redaction, access-control checks, or user warning. This can expose sensitive enterprise data on local disk, backups, shared workstations, or CI/CD artifacts, increasing the risk of unauthorized disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code writes extracted SAP data to a user-specified Excel file, which can contain sensitive enterprise records, but the function only reports success after writing and does not warn about the sensitivity or persistence of exported data. The CLI also allows interactive export without any confirmation or disclosure before saving data to disk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The function loads sensitive connection parameters including 'user' and 'passwd' from a local JSON file, but there is no warning in code output or documentation text about secure handling of credential files. This is a safety-relevant operation because it processes authentication secrets that users may store insecurely without realizing the risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The RFC function search hard-codes LANGUAGE to 'EN', which imposes a specific locale regardless of user preference or SAP system language. This is a natural-language policy issue because the file does not offer opt-in or explain why English is required.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.