feat: initial commit of Ghaymah internal DNS, TCP and security testing suite and report

This commit is contained in:
2026-10-12 23:43:09 +03:00
commit bdcd2d44f5
57 changed files with 6499 additions and 0 deletions
+66
View File
@@ -0,0 +1,66 @@
const fs = require('fs');
async function test() {
const tokenData = JSON.parse(fs.readFileSync('D:/cumin/ghaymah_dns_net_sec_tests/token.json', 'utf8'));
const token = tokenData.token;
const userId = tokenData.userId;
console.log('User ID:', userId);
// 1. Resources
const q1 = {
query: `query GetResources($userId: uuid) {
ghaymah_cloud_resources(where: { user_id: { _eq: $userId }, deleted: { _eq: false } }) {
id
chart_name
chart_version
status
values
}
}`,
variables: { userId }
};
const res1 = await fetch('https://graphql.ghaymah.systems/v1/graphql', {
method: 'POST',
headers: { 'Authorization': 'Bearer ' + token, 'Content-Type': 'application/json' },
body: JSON.stringify(q1)
});
console.log('Resources response:', JSON.stringify(await res1.json(), null, 2));
// 2. Managed Resources
const q2 = {
query: `query GetManagedResources($userId: uuid) {
ghaymah_cloud_managed_resources(where: { user_id: { _eq: $userId } }) {
id
values
status
}
}`,
variables: { userId }
};
const res2 = await fetch('https://graphql.ghaymah.systems/v1/graphql', {
method: 'POST',
headers: { 'Authorization': 'Bearer ' + token, 'Content-Type': 'application/json' },
body: JSON.stringify(q2)
});
console.log('Managed Resources response:', JSON.stringify(await res2.json(), null, 2));
// 3. ListApps
const q3 = {
query: `mutation ListApps {
listApps {
id
name
image
status
alias
}
}`
};
const res3 = await fetch('https://graphql.ghaymah.systems/v1/graphql', {
method: 'POST',
headers: { 'Authorization': 'Bearer ' + token, 'Content-Type': 'application/json' },
body: JSON.stringify(q3)
});
console.log('ListApps response:', JSON.stringify(await res3.json(), null, 2));
}
test().catch(console.error);