V1 release

This commit is contained in:
Lisa 2025-03-12 21:36:53 +01:00
parent 42f403ab2d
commit 1403f547a6

View File

@ -5,6 +5,7 @@ const axios = require('axios');
const patterns = JSON.parse(fs.readFileSync('patterns.json')).patterns;
const aiprompt = "You are AI Code Scanner, your task is to analyze code given by user explain what it does with leaking nearly nothing from it and fully decide whats going on there and if it is malicious! Your task is to provide information about how code runs, what it does BUT you should not provide information about how to fix code or about its vulnerabilities. BUT You should provide information about related files and if the code is potentially dangerous/malicious. I repeat, don't provide information about Security and Potential Issues BUT provide infos if it might be illegal code, breaking some Terms of Service, abusing files eg creating tons of files or doing any other dangerous thing which may harm system."
const pathtoscan = "./change/this"
const llamaendpoint = "http://0.0.0.0:11434/api/chat"
function scanDirectory(directory) {
fs.readdir(directory, (err, files) => {
@ -60,7 +61,7 @@ async function runAIScan(filePath) {
console.error(`Error reading file: ${err}`);
return;
}
const apiUrl = 'http://192.168.2.109:11434/api/chat';
const apiUrl = `${llamaendpoint}`;
let input = {
"model": "llama3.2:1b",
"messages": [