"APPAP309E Script run using untrusted shell" is observed when integrating with "in memory" application
121
Created On 11/10/26 11:02 AM - Last Modified 11/10/26 16:10 PM
Symptom
When using an "in memory" application, along with path authentication, it is not possible to retrieve credentials. When reviewing the APPTrace log, the following is observed:
[21/11/2023 | 16:21:49.702568] | {pid= 6672} | {tid= 7280} | class CAuthenticatorLocal * __ptr64 | APP\(39) | :: | Getting auth element for PathAuth auth type
[21/11/2023 | 16:21:49.702581] | {pid= 6672} | {tid= 7280} | STATIC | APP\(1468) | :: | Investigating process on level 0
[21/11/2023 | 16:21:49.706030] | {pid= 6672} | {tid= 7280} | STATIC | APP\(1929) | :: | Process filename [C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe] is valid
[21/11/2023 | 16:21:49.706134] | {pid= 6672} | {tid= 7280} | class CCAGOSOExceptionBase * __ptr64 | APP\(32) | :: | CASCU095E Failed to find out application script file path. (Error: Process has no arguments. (command: "), Error code: -1).
...
[21/11/2023 | 16:21:49.708918] | {pid= 6672} | {tid= 7280} | class CAPPBaseException * __ptr64 | APP\(85) | :: | APPAP009E Application Password Provider exception occurred. APPAP309E Script run using untrusted shell. (Codes: -1, -2)
[21/11/2023 | 16:21:49.702581] | {pid= 6672} | {tid= 7280} | STATIC | APP\(1468) | :: | Investigating process on level 0
[21/11/2023 | 16:21:49.706030] | {pid= 6672} | {tid= 7280} | STATIC | APP\(1929) | :: | Process filename [C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe] is valid
[21/11/2023 | 16:21:49.706134] | {pid= 6672} | {tid= 7280} | class CCAGOSOExceptionBase * __ptr64 | APP\(32) | :: | CASCU095E Failed to find out application script file path. (Error: Process has no arguments. (command: "), Error code: -1).
...
[21/11/2023 | 16:21:49.708918] | {pid= 6672} | {tid= 7280} | class CAPPBaseException * __ptr64 | APP\(85) | :: | APPAP009E Application Password Provider exception occurred. APPAP309E Script run using untrusted shell. (Codes: -1, -2)
Environment
10.10;11.1;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1;12.2;11.8;12.6;13.0;13.2;13.1 Privileged Access Manager (PAM, self-hosted) Credential Provider
Credential Provider Windows Credential Provider
Cause
Integrating CP with an "in memory" application, and being authenticated by path authentication, is not supported.
Resolution
Instead of running the application in this way, the following options can be considered:
-
Run "<powershell.exe> <customer script>", which would require you to export the code to an external script and then the path to the your script will be allowed by path authentication.
-
Use one of the SDKs (C/.Net/Java) instead of the CLI, and that will eliminate the need for an "in memory" module.
-
Use other forms of authentication such as address or user authentication.