mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 13:01:56 +00:00
fix: Don't invoke tools if no providers or completed scans (#8443)
Co-authored-by: Chandrapal Badshah <12944530+Chan9390@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
cf8402e013
commit
b30eab7935
@@ -77,9 +77,12 @@ Email: ${userData.email}
|
||||
Company: ${userData.company}
|
||||
|
||||
**CURRENT PROVIDER DATA:**
|
||||
${providersWithScans
|
||||
.map(
|
||||
(provider, index) => `
|
||||
${
|
||||
providersWithScans.length === 0
|
||||
? "No Providers Connected"
|
||||
: providersWithScans
|
||||
.map(
|
||||
(provider, index) => `
|
||||
Provider ${index + 1}:
|
||||
- Name: ${provider.name}
|
||||
- Type: ${provider.provider_type}
|
||||
@@ -94,8 +97,9 @@ ${
|
||||
: "- No completed scans found"
|
||||
}
|
||||
`,
|
||||
)
|
||||
.join("\n")}
|
||||
)
|
||||
.join("\n")
|
||||
}
|
||||
`;
|
||||
} catch (error) {
|
||||
console.error("Failed to retrieve current data:", error);
|
||||
|
||||
@@ -47,6 +47,7 @@ You use Prowler tool's capabilities to answer the user's query.
|
||||
- Always use business context and goals before answering questions on improving cloud security posture.
|
||||
- When the user asks questions without mentioning a specific provider or scan ID, pass all relevant data to downstream agents as an array of objects.
|
||||
- If the necessary data (like the latest scan ID, provider ID, etc) is already in the prompt, don't use tools to retrieve it.
|
||||
- Queries on resource/findings can be only answered if there are providers connected and these providers have completed scans.
|
||||
|
||||
## Operation Steps
|
||||
|
||||
|
||||
Reference in New Issue
Block a user