Find LLM prompt and completion logging (OWASP LLM02)
ProprietaryFind configuration that writes LLM prompts and completions to the application log: the Spring AI log-prompt and log-completion observation properties, LangChain4j log-requests and log-responses properties and their builder equivalents, and Spring AI's SimpleLoggerAdvisor. Prompts carry whatever users and retrieved documents put into them, and completions can repeat it, so logging them copies personal and confidential data into log files and log aggregation systems with much wider access than the application itself.
org. openrewrite. ai. security. FindLlmPromptLoggingmod run . --recipe= org. openrewrite. ai. security. FindLlmPromptLoggingInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.