واجهة البرمجةAPI

لا يوجد خادم ولا واجهة HTTP. هذه صفحة لما يمكن استدعاؤه من المتصفح ومن سطر الأوامر.There is no server and no HTTP API. This page covers what you can call from the browser and the command line.

لا واجهة HTTPNo HTTP API

تحصين موقع ثابت. لا توجد نقاط نهاية ولا مفاتيح API ولا حسابات. كل المعالجة داخل متصفحك أو على جهازك عند استخدام سطر الأوامر.Tahsin is a static site. There are no endpoints, API keys or accounts. All processing happens in your browser, or on your machine when you use the command line.

سطر الأوامرCommand line

يتطلب Node.js 18 أو أحدث. لا توجد اعتمادات خارجية.Requires Node.js 18 or newer. No dependencies.

git clone https://github.com/tahsin-pqc/tahsin.git
cd tahsin
node cli.js scan.json --lang both --format md > report.md
node cli.js scan.txt --lang en --format html > report.html
  • --lang: ar أو en أو both (الافتراضي both).--lang: ar, en or both (default both).
  • --format: md أو html (الافتراضي md).--format: md or html (default md).

من Node.jsFrom Node.js

const P = require('./src/core.js');
const res = P.analyze(fs.readFileSync('scan.json', 'utf8'));
console.log(P.reportMD(res, 'en', '2026-11-30'));

analyze(text) يعيد قائمة الأصول المصنّفة وعدّادات. reportMD وreportHTML يأخذان النتيجة واللغة والتاريخ.analyze(text) returns the classified asset list and counts. reportMD and reportHTML take the result, a language and a date.

في المتصفحIn the browser

الصفحة الرئيسية تعرّف الكائن العام PQCM بالوحدات التالية. هذه واجهة داخلية وقد تتغير بين الإصدارات.The main page defines a global PQCM object with the modules below. This is an internal interface and may change between versions.

ModuleMain functions
PQCM.parsersparseSource(text), validateCbom, checkFile, textScan
PQCM.confscanTLS/SSH config parsing helpers
PQCM.x509DER/PEM certificate parsing
PQCM.suitescipher-suite decomposition
PQCM.analyzeanalyze(settings), defaults(), sanitize(s)
PQCM.reportreport(analysis, lang, date), exec(analysis, lang, date), issueText(code, lang)
PQCM.exportertoCSV(analysis), toJSON(analysis, date), toCBOM(analysis, date)
PQCM.comparediff(oldReport, newReport)
PQCM.agilityQUESTIONS, assess(answers)
PQCM.regsREG (regulation items), NIST, CHECKED
PQCM.solutionsrelevant(analysis), mailto(analysis, lang, date)
PQCM.historyload(), save(analysis, date), clear()
const a = PQCM.analyze.analyze({
  juris: ['SA', 'EG'],
  sources: [{ label: 'scan', text: scanText, life: 10 }]
});
console.log(a.counts); // totals, vulnerable, weak, hybrid, P0..P3

تصدير JSON وCBOMJSON and CBOM export

زر التصدير يكتب الأصول والأولويات والافتراضات. أعمدة CSV: asset, type, class, family, status, usage_role, role_source, source, count, priority, data_lifetime_years, sensitivity, effort_person_days, locations. الخلايا محمية من حقن صيغ Excel. زر CBOM يكتب مستند CycloneDX 1.6 فيه مكوّن cryptographic-asset لكل نتيجة، والوصف موسوم صراحة بأنه تقدير تحصين (أداة تخطيط وليست تدقيقًا). زر الملخص التنفيذي يكتب صفحة HTML مستقلة قابلة للطباعة بلا أي مورد خارجي.The export button writes assets, priorities and assumptions. CSV columns: asset, type, class, family, status, usage_role, role_source, source, count, priority, data_lifetime_years, sensitivity, effort_person_days, locations. Cells are guarded against spreadsheet formula injection. The CBOM button writes a CycloneDX 1.6 document with one cryptographic-asset component per finding, its description plainly marked as a Tahsin assessment (planning aid, not an audit). The executive-summary button writes a standalone printable HTML page with no external resources.

الاستقرارStability

لا يوجد إصدار مستقر للواجهة الداخلية بعد. اعتمد على الإصدار الذي ثبّتَّه من المستودع.The internal interface has no stability promise yet. Pin the version you take from the repository.