cursorrules — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited cursorrules (Rules) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Plateforme de certification et vérification d'authenticité pour les entreprises Stack: Next.js 16, Prisma, PostgreSQL, JWT (ES256), QR Codes
Déploiement & Neon (bold-frost / vercel-dev) : voir DEPLOYMENT.md.
BlockTrust est une plateforme permettant aux entreprises de :
qrcodeblocktrust-mvp/
├── app/
│ ├── api/
│ │ ├── entities/
│ │ │ └── route.ts # CRUD des entités
│ │ └── v2/
│ │ ├── issue/
│ │ │ └── route.ts # Génération de signatures JWT
│ │ └── verify/
│ │ └── route.ts # Vérification de signatures
│ ├── badge/
│ │ └── [id]/
│ │ └── page.tsx # Page badge avec QR code
│ ├── components/
│ │ └── QRCode.tsx # Composant QR code
│ ├── dashboard/
│ │ ├── create/
│ │ │ └── page.tsx # Formulaire création entité
│ │ └── page.tsx # Dashboard principal
│ ├── verify/
│ │ ├── [id]/
│ │ │ └── page.tsx # Vérification par ID/SIRET
│ │ └── page.tsx # Vérification par token JWT
│ ├── lib/
│ │ └── db.ts # Client Prisma
│ └── page.tsx # Page d'accueil
├── lib/
│ └── v2/
│ ├── context.ts # Canonicalisation et hash des contextes
│ └── jwt.ts # Signatures et vérification JWT
├── prisma/
│ ├── schema.prisma # Schéma de base de données
│ ├── migrations/ # Migrations Prisma
│ └── seed.js # Script de seed
└── README.mdkycStatus (PENDING/APPROVED/REJECTED)validationLevel (BRONZE/SILVER/GOLD)jti: Identifiant unique du tokenctxHash: Hash du contexte signéexpiresAt: Date d'expirationrevoked: Statut de révocation/api/v2/issueGénère une signature JWT pour un contexte email.
Request:
{
"entityId": "string",
"certificateId": "string",
"context": {
"from": "[email protected]",
"to": "[email protected]",
"subject": "Sujet de l'email",
"date": "2024-01-15T10:00:00Z",
"body": "Corps de l'email (optionnel)"
},
"expiresInSeconds": 3600
}Response:
{
"token": "eyJ...",
"verifyUrl": "http://localhost:3000/verify?token=...",
"signatureId": "uuid"
}/api/v2/verifyVérifie une signature JWT.
Request:
{
"token": "eyJ...",
"context": {
"from": "[email protected]",
"to": "[email protected]",
"subject": "Sujet de l'email",
"date": "2024-01-15T10:00:00Z",
"body": "Corps de l'email (optionnel)"
}
}Response:
{
"verdict": "VALID" | "VALID_WITH_WARNING" | "TAMPERED" | "REVOKED" | "EXPIRED" | "INVALID",
"reason": "string (optionnel)",
"entityId": "string",
"certificateId": "string",
"jti": "string"
}npm installCréer un fichier .env à la racine :
# Base de données
DATABASE_URL="postgresql://user:password@localhost:5432/blocktrust"
DIRECT_URL="postgresql://user:password@localhost:5432/blocktrust"
# JWT (clés ECDSA ES256)
BLOCKTRUST_JWT_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"
BLOCKTRUST_JWT_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"
# Application
NEXT_PUBLIC_APP_URL="http://localhost:3000"# Générer une paire de clés ECDSA
openssl ecparam -genkey -name prime256v1 -noout -out private-key.pem
openssl ec -in private-key.pem -pubout -out public-key.pem
# Convertir en format PKCS8 pour la clé privée
openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private-key.pem -out private-key-pkcs8.pemCopier le contenu de private-key-pkcs8.pem dans BLOCKTRUST_JWT_PRIVATE_KEY et public-key.pem dans BLOCKTRUST_JWT_PUBLIC_KEY (avec \n pour les retours à la ligne).
# Générer le client Prisma
npx prisma generate
# Appliquer les migrations
npx prisma migrate deploy
# (Optionnel) Seed la base de données
npm run seednpm run devL'application sera accessible sur http://localhost:3000
npm run dev - Lance le serveur de développementnpm run build - Build de productionnpm run start - Lance le serveur de productionnpm run lint - Vérifie le code avec ESLintnpm run seed - Seed la base de données avec des données de démoPropriétaire - Tous droits réservés
Développé avec ❤️ pour BlockTrust
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.