Skip to content

Ai integration prototype#969

Open
sMeilbeck wants to merge 34 commits intodevfrom
AI-integration-prototype
Open

Ai integration prototype#969
sMeilbeck wants to merge 34 commits intodevfrom
AI-integration-prototype

Conversation

@sMeilbeck
Copy link
Collaborator

No description provided.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 2, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
5 Security Hotspots
E Security Rating on New Code (required ≥ A)
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE


// Temporarily write JSON to disk for html-reporter
const tempJsonPath = path.join(process.cwd(), `features/${reportName}.json`);
await fs.promises.writeFile(tempJsonPath, fullReport.jsonReport);

Check failure

Code scanning / SonarCloud

I/O function calls should not be vulnerable to path injection attacks High

Change this code to not construct the path from user-controlled data. See more on SonarQube Cloud

// Read HTML and send
const htmlPath = path.join(process.cwd(), `features/${reportName}.html`);
const htmlContent = await fs.promises.readFile(htmlPath, 'utf8');

Check failure

Code scanning / SonarCloud

I/O function calls should not be vulnerable to path injection attacks High

Change this code to not construct the path from user-controlled data. See more on SonarQube Cloud
res.json({ htmlFile: htmlContent, reportId: fullReport._id }); // Send HTML content

// Clean up temporary files
await fs.promises.unlink(tempJsonPath).catch(err => console.error(`Failed to delete temp JSON: ${err}`));

Check failure

Code scanning / SonarCloud

I/O function calls should not be vulnerable to path injection attacks High

Change this code to not construct the path from user-controlled data. See more on SonarQube Cloud

// Clean up temporary files
await fs.promises.unlink(tempJsonPath).catch(err => console.error(`Failed to delete temp JSON: ${err}`));
await fs.promises.unlink(htmlPath).catch(err => console.error(`Failed to delete temp HTML: ${err}`)); // Optional: keep HTML?

Check failure

Code scanning / SonarCloud

I/O function calls should not be vulnerable to path injection attacks High

Change this code to not construct the path from user-controlled data. See more on SonarQube Cloud
} catch (error) {
// Ensure temporary group folder is cleaned up on error if created
if (req.body?.name && fs.existsSync(path.join(process.cwd(), 'features', req.body.name))) {
fs.rm(path.join(process.cwd(), 'features', req.body.name), { recursive: true, force: true }, (err) => {

Check failure

Code scanning / SonarCloud

I/O function calls should not be vulnerable to path injection attacks High

Change this code to not construct the path from user-controlled data. See more on SonarQube Cloud
): Promise<{ success: boolean }> {
const client = await dbConnector.establishConnection();
const session = client.startSession();
const zip = new AdmZip(file.buffer);

Check failure

Code scanning / SonarCloud

I/O function calls should not be vulnerable to path injection attacks High

Change this code to not construct the path from user-controlled data. See more on SonarQube Cloud
const authString = externalAccountService.buildAuthString(jiraAccountName, jiraPassword, jiraAuthMethod);
const options = { method: 'GET', headers: { 'Authorization': authString }};
const jiraURL = `https://${jiraHost}/rest/auth/1/session`;
const response = await fetch(jiraURL, options);

Check warning

Code scanning / SonarCloud

Server-side requests should not be vulnerable to forging attacks Medium

Change this code to not construct the URL from user-controlled data. See more on SonarQube Cloud
}
};

const response = await fetch(url.toString(), options);

Check warning

Code scanning / SonarCloud

Server-side requests should not be vulnerable to traversing attacks Medium

Change this code to not construct the URL's path from user-controlled data. See more on SonarQube Cloud

// 3. Send DELETE request to XRay
console.log(`Sending XRay DELETE request to: ${url}`);
const response = await fetch(url, options);

Check warning

Code scanning / SonarCloud

Server-side requests should not be vulnerable to traversing attacks Medium

Change this code to not construct the URL's path from user-controlled data. See more on SonarQube Cloud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant