OpenAI API Test
ID: api-openai
Severity: info
Author: geeknik
Tags: token-spray,openai
Description
Section titled “Description”YAML Source
Section titled “YAML Source”id: api-openai
info: name: OpenAI API Test author: geeknik severity: info reference: - https://platform.openai.com/docs/api-reference metadata: verified: true max-request: 1 tags: token-spray,openai
self-contained: true
http: - method: POST path: - "https://api.openai.com/v1/chat/completions" body: | { "model": "gpt-3.5-turbo", "messages": [ {"role": "system", "content": "You are a helpful assistant designed to output JSON."}, {"role": "user", "content": "Who won the world series in 2020?"} ] }
headers: Content-Type: application/json Authorization: Bearer {{token}}
matchers-condition: and matchers: - type: word part: body words: - 'Los Angeles Dodgers' - type: word part: body words: - 'invalid_request_error' - 'Incorrect API key' - 'invalid_api_key' condition: or negative: true# digest: 4a0a004730450221008fb4d8872899a8e9448961c305da17e034244c08eaf0df22c01260b3fc8b7a4d022052f9b90015be91b811d8aac84443c3b4fda82d36520b4406218db80c36f308e7:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.
$ nuclei -u "URL" -t "http/token-spray/api-openai.yaml"