Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"github_token": "",
"repository": "asrar-mared/Zayed-Shield",
"logging_level": "INFO",
"modules": {
"vulnerability_scanner": true,
"github_monitor": true
}
}
151 changes: 51 additions & 100 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,73 +2,94 @@
"name": "zayed-shield",
"version": "27.7.7",
"codename": "Vulnerability Hunter",
"description": "Professional security toolkit with zero vulnerabilities - Cryptographic operations, threat detection, and advanced protection.",
"description": "Professional security toolkit with zero vulnerabilities — cryptographic operations, threat detection, advanced monitoring, and secure automation.",
"main": "index.js",
"type": "module",
"keywords": [
"security",
"cryptography",
"secp256k1",
"vulnerability-hunter",
"penetration-testing",
"threat-detection",
"cybersecurity",
"zayed-shield"
],
"author": "Zayed Security Research Team",
"author": {
"name": "Zayed CyberShield Team",
"email": "info@zayed-cybershield.ae",
"url": "https://zayed-cybershield.ae"
},
"license": "MIT",
"homepage": "https://github.com/zayed-shield/zayed-shield",
"homepage": "https://github.com/zayed-cybershield/protection#readme",
"repository": {
"type": "git",
"url": "https://github.com/zayed-shield/zayed-shield.git"
"url": "https://github.com/zayed-cybershield/protection.git"
},
"bugs": {
"url": "https://github.com/zayed-shield/issues",
"email": "security@zayed-shield.com"
"url": "https://github.com/zayed-cybershield/protection/issues"
},

"keywords": [
"cybersecurity",
"cryptography",
"vulnerability-hunter",
"penetration-testing",
"threat-detection",
"security",
"uae",
"zayed",
"anti-tamper",
"درع-زايد",
"أمن-سيبراني",
"حماية",
"الإمارات"
],

"engines": {
"node": ">=14.0.0",
"npm": ">=7.0.0"
"node": ">=18.0.0",
"npm": ">=9.0.0"
},

"dependencies": {
"@noble/secp256k1": "^3.0.0",
"express": "^4.18.2",
"express": "^4.19.0",
"lodash": "^4.17.21"
},

"devDependencies": {
"ajv": "^8.18.0",
"ajv-keywords": "^5.1.0",
"chai": "^6.2.2",
"eslint": "^10.0.0",
"chai": "^5.1.0",
"eslint": "^9.0.0",
"eslint-plugin-security": "^3.0.1",
"nyc": "^17.1.0",
"jest": "^30.0.0",
"webpack": "^6.0.0"
"html-webpack-plugin": "^5.6.6",
"jest": "^29.0.0",
"nyc": "^17.1.0",
"terser-webpack-plugin": "^5.3.16",
"webpack": "^5.105.2",
"webpack-cli": "^5.1.4"
"webpack": "^6.0.0",
"webpack-cli": "^5.1.4",
"html-webpack-plugin": "^5.6.6",
"terser-webpack-plugin": "^5.3.16"
},

"peerDependencies": {
"react": ">=18.0.0",
"vue": ">=3.0.0"
},

"scripts": {
"test": "jest",
"test:coverage": "nyc npm test",
"lint": "eslint .",
"lint:fix": "eslint . --fix",

"security:check": "npm audit --omit=dev",
"security:fix": "npm audit fix",
"security:update": "npm update && npm audit",
"security:full": "npm audit && npm outdated",

"prebuild": "npm run security:check",
"build": "webpack --mode production",
"start": "node index.js",
"dev": "webpack --mode development --watch",

"start": "node index.js",

"clean": "rm -rf node_modules package-lock.json",
"reinstall": "npm run clean && npm install",

"prepare": "npm run build",
"prepublishOnly": "npm test && npm run lint"
},

"files": [
"dist/",
"src/",
Expand All @@ -79,76 +100,6 @@
"SECURITY.md",
"CHANGELOG.md"
],

"types": "index.d.ts"
"keywords": [
"cybersecurity",
"protection",
"uae",
"zayed",
"security",
"anti-tamper",
"درع-زايد",
"أمن-سيبراني",
"حماية",
"الإمارات"
],
"author": {
"name": "Zayed CyberShield Team",
"email": "info@zayed-cybershield.ae",
"url": "https://zayed-cybershield.ae"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/zayed-cybershield/protection.git"
},
"bugs": {
"url": "https://github.com/zayed-cybershield/protection/issues"
},
"homepage": "https://github.com/zayed-cybershield/protection#readme",
"engines": {
"node": ">=14.0.0",
"npm": ">=6.0.0"
},
"peerDependencies": {
"react": ">=16.8.0",
"vue": ">=2.6.0"
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "webpack",
"start": "webpack serve"
},
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "webpack",
"start": "webpack serve"
},
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "webpack",
"start": "webpack serve"
},
"author": "",
"license": "ISC",
"dependencies": {
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.23.0",
"validator": "^13.15.23"
},
"devDependencies": {
"@babel/core": "^7.28.5",
"@babel/preset-env": "^7.28.5",
"@babel/preset-react": "^7.28.5",
"babel-loader": "^10.0.0",
"html-webpack-plugin": "^5.6.5",
"webpack": "^5.103.0",
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.2.2"
}
}
10 changes: 8 additions & 2 deletions src/core/engine.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
from modules.vulnerability_scanner import VulnerabilityScanner
from modules.github_monitor import GitHubMonitor
from utils.helpers import log
from utils.config_loader import load_config

class Engine:
def __init__(self):
self.config = load_config()
log("Engine initialized.", "ENGINE")
self.modules = []

def load_modules(self):
log("Loading modules...", "ENGINE")
self.modules.append(VulnerabilityScanner())
self.modules.append(GitHubMonitor())

if self.config["modules"]["vulnerability_scanner"]:
self.modules.append(VulnerabilityScanner())

if self.config["modules"]["github_monitor"]:
self.modules.append(GitHubMonitor())

def start(self):
log("Starting core system...", "ENGINE")
Expand Down
38 changes: 38 additions & 0 deletions src/modules/github_monitor.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,46 @@
from utils.helpers import log
from utils.graphql_client import GitHubGraphQL
from utils.config_loader import load_config

class GitHubMonitor:
def __init__(self):
log("GitHubMonitor loaded.", "MODULE")
self.client = GitHubGraphQL()
self.config = load_config()

def run(self):
log("Checking GitHub repository status...", "MODULE")

repo = self.config["repository"]

query = f"""
{{
repository(name: "{repo.split('/')[1]}", owner: "{repo.split('/')[0]}") {{
issues(states: OPEN) {{
totalCount
}}
pullRequests(states: OPEN) {{
totalCount
}}
}}
}}
"""

result = self.client.query(query)

# -------------------------
# Error Handling
# -------------------------
if "errors" in result:
log(f"GraphQL Error: {result['errors']}", "ERROR")
return

if "data" not in result or result["data"]["repository"] is None:
log("No data returned from GitHub. Check token or repository name.", "ERROR")
return

issues = result["data"]["repository"]["issues"]["totalCount"]
prs = result["data"]["repository"]["pullRequests"]["totalCount"]

log(f"Open Issues: {issues}", "MODULE")
log(f"Open Pull Requests: {prs}", "MODULE")
5 changes: 5 additions & 0 deletions src/utils/config_loader.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import json

def load_config():
with open("config.json", "r") as f:
return json.load(f)
21 changes: 21 additions & 0 deletions src/utils/graphql_client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import requests
from utils.config_loader import load_config

class GitHubGraphQL:
def __init__(self):
config = load_config()
self.token = config["github_token"]
self.endpoint = "https://api.github.com/graphql"

def query(self, query_string):
headers = {
"Authorization": f"Bearer {self.token}"
}

response = requests.post(
self.endpoint,
json={"query": query_string},
headers=headers
)

return response.json()