Compare commits

...

46 Commits

Author SHA1 Message Date
root 685697e470 fix: "renovate" 2026-06-30 09:05:25 +00:00
root 94b058a6e7 feature: lance les tests (xvfb-run npm test) dans la CI Drone avant le packaging vsix
continuous-integration/drone/tag Build is passing
2026-06-25 22:30:24 +02:00
root a896a8e7fc fix: nettoyage commentaires boilerplate yo-code dans tsconfig (JSON strict valide) 2026-06-25 22:14:56 +02:00
root a05d2218c6 fix: eslint reportUnusedDisableDirectives error (sweep flotte) + nettoyage
continuous-integration/drone/tag Build is passing
2026-06-25 00:25:49 +02:00
root 8908a32a68 feature: sweep flotte (propagation libs copy-first model/monitoring/requestPromise/influxdb, config eslint/lintstaged/husky, migration TS, avancement conformite migrations Vite)
continuous-integration/drone/tag Build is passing
2026-06-24 00:28:06 +02:00
root 695d1c1b50 feature: sweep flotte (propagation libs copy-first, migration TS, chantiers en cours)
continuous-integration/drone/tag Build is passing
2026-06-23 17:43:28 +02:00
root 7da16a82e5 chore: audit securite (todo.txt)
todo.txt
2026-06-21 08:26:17 +02:00
root c297beb494 fix: release
continuous-integration/drone/tag Build is passing
2026-06-20 00:43:29 +00:00
m.schnitzler da5bbfe1a8 renovate (#181)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2026-06-20 00:43:13 +00:00
root 5b116e016c feature: tag source:vscode sur events open/save + .npmrc fund/audit 2026-06-14 22:43:42 +02:00
root 39b5d46122 fix: release
continuous-integration/drone/tag Build is passing
2026-06-12 00:14:22 +00:00
m.schnitzler fa606b745d renovate (#180)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2026-06-12 00:14:08 +00:00
root b98b3db80b feature: robots.txt->sitemap, cleanup tooling (twig-cs-fixer/c8rc), maj libs flotte
continuous-integration/drone/tag Build is passing
2026-06-11 18:06:50 +02:00
root 44b8302801 up 2026-06-09 14:00:08 +02:00
root b16b775efb chore: harmonisation flotte (ignores legacy/ eslint/prettier/dockerignore, garde-fou vite watch.ignored, Dockerfile npm ci) 2026-06-06 08:14:12 +02:00
root f332115e6a fix: release
continuous-integration/drone/tag Build is passing
2026-06-03 00:40:20 +00:00
m.schnitzler 24a26551ce renovate (#179)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2026-06-03 00:40:08 +00:00
root ef8c92a4b4 chore: retrait du hook myhtmlvalidate (lib archivée) 2026-06-03 02:01:46 +02:00
root bf88d3526f fix: release
continuous-integration/drone/tag Build is passing
2026-06-02 02:08:43 +00:00
m.schnitzler c70435e58a renovate (#178)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2026-06-02 02:08:12 +00:00
root 852901b3d4 fix: release
continuous-integration/drone/tag Build is passing
2026-06-01 01:36:27 +00:00
m.schnitzler 569b8e9fb8 renovate (#177)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2026-06-01 01:36:08 +00:00
root 8cdded7043 chore: normalise ignore dist/ & tsconfig.tsbuildinfo 2026-05-31 18:19:15 +02:00
root 7513901a40 fix: release
continuous-integration/drone/tag Build is passing
2026-05-27 01:13:29 +00:00
m.schnitzler 93e52dff3d renovate (#176)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2026-05-27 01:13:13 +00:00
root cc613f0ba2 fix: release
continuous-integration/drone/tag Build is passing
2026-05-19 23:48:22 +00:00
m.schnitzler 89c79b096f renovate (#175)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2026-05-19 23:48:10 +00:00
root f0fb696a0e fix: release
continuous-integration/drone/tag Build is passing
2026-05-18 00:50:26 +00:00
m.schnitzler 8b83bbe16f renovate (#174)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2026-05-18 00:50:06 +00:00
root 899eba65dd chore: ignore .vscode-test/ dans eslint/prettier/gitleaks
continuous-integration/drone/tag Build is passing
2026-05-17 14:48:59 +02:00
root ef476c0891 fix: release
continuous-integration/drone/tag Build is passing
2026-05-15 00:41:40 +00:00
m.schnitzler c6ceff6841 renovate (#173)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2026-05-15 00:41:12 +00:00
root 25f8680fce fix: release
continuous-integration/drone/tag Build is passing
2026-05-13 01:28:50 +00:00
m.schnitzler b25fcc8fcf renovate (#172)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2026-05-13 01:28:36 +00:00
root dc9863ccc4 fix: release
continuous-integration/drone/tag Build is passing
2026-05-11 04:56:34 +00:00
m.schnitzler 229e0f4c03 renovate (#171)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2026-05-11 04:56:17 +00:00
root 4ea75811de fix: release
continuous-integration/drone/tag Build is passing
2026-05-10 05:03:49 +00:00
m.schnitzler 7cf1d6f7dc renovate (#170)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2026-05-10 05:03:14 +00:00
root b8e2339c9c fix: release
continuous-integration/drone/tag Build is passing
2026-05-09 09:40:49 +00:00
m.schnitzler d29a1bea80 renovatemajor (#169)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2026-05-09 09:40:32 +00:00
root 8d282828c0 fix: ajout @eslint/js et globals manquants pour eslint.config.js
continuous-integration/drone/tag Build is passing
2026-05-08 23:24:10 +02:00
root 07a89c5829 fix: release
continuous-integration/drone/tag Build is passing
2026-05-06 00:48:37 +00:00
m.schnitzler dac0a7b6fa renovate (#168)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2026-05-06 00:48:23 +00:00
root a574802ffb fix: release
continuous-integration/drone/tag Build is passing
2026-04-30 23:55:22 +00:00
m.schnitzler 228211991d renovate (#167)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2026-04-30 23:55:13 +00:00
root be832c4df4 up 2026-04-30 15:02:16 +02:00
12 changed files with 700 additions and 780 deletions
+1
View File
@@ -18,6 +18,7 @@ steps:
commands: commands:
- npm install -g vsce - npm install -g vsce
- npm ci - npm ci
- xvfb-run -a npm test
- vsce package - vsce package
- name: gitea_release - name: gitea_release
+3 -1
View File
@@ -1,5 +1,4 @@
out out
dist
node_modules node_modules
.vscode-test/ .vscode-test/
*.vsix *.vsix
@@ -31,3 +30,6 @@ coverage/
.config/ .config/
data/ data/
.aider* .aider*
/dist/
tsconfig.tsbuildinfo
.twig-cs-fixer.cache
+5
View File
@@ -0,0 +1,5 @@
[extend]
useDefault = true
[allowlist]
paths = ['''\.vscode-test/''']
+2 -1
View File
@@ -1,8 +1,9 @@
{ {
"*.js": ["eslint --fix", "prettier --write"], "*.js": ["eslint --fix", "prettier --write"],
"*.ts": ["eslint --fix", "prettier --write"],
"*.css": ["prettier --write"], "*.css": ["prettier --write"],
"*.jsx": ["prettier --write"], "*.jsx": ["prettier --write"],
"*.html.twig": ["twig-cs-fixer lint --fix", "myhtmlvalidate -q"], "*.tsx": ["prettier --write"],
"*.php": ["php-cs-fixer fix --config .php-cs-fixer.php"], "*.php": ["php-cs-fixer fix --config .php-cs-fixer.php"],
"Dockerfile": ["hadolint --ignore DL3002 --ignore DL3003 --ignore DL3008 --ignore DL3013 --ignore DL3016 --ignore DL3022"], "Dockerfile": ["hadolint --ignore DL3002 --ignore DL3003 --ignore DL3008 --ignore DL3013 --ignore DL3016 --ignore DL3022"],
"*.md": ["markdownlint --fix"], "*.md": ["markdownlint --fix"],
+2
View File
@@ -1 +1,3 @@
min-release-age=1 min-release-age=1
fund=false
audit=false
+4
View File
@@ -4,3 +4,7 @@ log/*
node_modules/* node_modules/*
coverage/* coverage/*
data/* data/*
.vscode-test/
/dist/
tsconfig.tsbuildinfo
legacy/*
+3 -1
View File
@@ -4,6 +4,8 @@ import tsplugin from '@typescript-eslint/eslint-plugin';
import globals from 'globals'; import globals from 'globals';
export default [ export default [
// remonte (et --fix supprime) tout eslint-disable inutile : regle deja off, inactive, ou qui ne tire pas
{ linterOptions: { reportUnusedDisableDirectives: 'error' } },
js.configs.recommended, js.configs.recommended,
{ {
files: ['**/*.ts'], files: ['**/*.ts'],
@@ -61,6 +63,6 @@ export default [
}, },
}, },
{ {
ignores: ['out/', 'dist/', '**/*.d.ts'], ignores: ['legacy/', 'out/', 'dist/', '.vscode-test/', '**/*.d.ts'],
}, },
]; ];
+665 -684
View File
File diff suppressed because it is too large Load Diff
+12 -10
View File
@@ -1,7 +1,7 @@
{ {
"name": "vscodestat", "name": "vscodestat",
"displayName": "vscodestat", "displayName": "vscodestat",
"version": "1.2.1", "version": "1.6.0",
"description": "", "description": "",
"categories": [ "categories": [
"Other" "Other"
@@ -49,22 +49,24 @@
"onStartupFinished" "onStartupFinished"
], ],
"devDependencies": { "devDependencies": {
"@eslint/js": "^10.0.1",
"@types/mocha": "^10.0.10", "@types/mocha": "^10.0.10",
"@types/node": "25.x", "@types/node": "26.x",
"@types/vscode": "^1.116.0", "@types/vscode": "^1.125.0",
"@typescript-eslint/eslint-plugin": "^8.59.1", "@typescript-eslint/eslint-plugin": "^8.62.0",
"@typescript-eslint/parser": "^8.59.1", "@typescript-eslint/parser": "^8.62.0",
"@vscode/test-cli": "^0.0.12", "@vscode/test-cli": "^0.0.15",
"@vscode/test-electron": "^2.5.2", "@vscode/test-electron": "^3.0.0",
"eslint": "^10.1.0", "eslint": "^10.1.0",
"globals": "^17.7.0",
"husky": "^9.1.7", "husky": "^9.1.7",
"lint-staged": "^16.4.0", "lint-staged": "^17.0.8",
"prettier": "^3.8.3", "prettier": "^3.9.1",
"ts-api-utils": "^2.5.0", "ts-api-utils": "^2.5.0",
"typescript": "^6.0.3" "typescript": "^6.0.3"
}, },
"engines": { "engines": {
"vscode": "^1.116.0" "vscode": "^1.125.0"
}, },
"icon": "icon.png", "icon": "icon.png",
"extensionKind": [ "extensionKind": [
+2 -2
View File
@@ -36,7 +36,7 @@ export function activate(context: vscode.ExtensionContext) {
console.log('Opened file:', filePath); console.log('Opened file:', filePath);
// vscode.window.showInformationMessage(`Opened file: ${filePath}`); // vscode.window.showInformationMessage(`Opened file: ${filePath}`);
await makeHttpRequest({ event: 'open', project: extractProjectName(filePath) }); await makeHttpRequest({ event: 'open', project: extractProjectName(filePath), source: 'vscode' });
} }
}); });
@@ -46,7 +46,7 @@ export function activate(context: vscode.ExtensionContext) {
console.log('Saved file:', filePath); console.log('Saved file:', filePath);
// vscode.window.showInformationMessage(`Saved file: ${filePath}`); // vscode.window.showInformationMessage(`Saved file: ${filePath}`);
await makeHttpRequest({ event: 'save', project: extractProjectName(filePath) }); await makeHttpRequest({ event: 'save', project: extractProjectName(filePath), source: 'vscode' });
}); });
// detecte un focus / blur de la fenetre vscode // detecte un focus / blur de la fenetre vscode
-76
View File
@@ -1,76 +0,0 @@
REVIEW DE CODE — 2026-04-26
============================================
Extension VSCode (TypeScript) qui collecte des metriques sur
l'activite du user dans VSCode :
- ouverture de fichier / changement d'onglet (event 'open')
- sauvegarde de fichier (event 'save')
- focus/blur de la fenetre (event 'focus')
Envoie un POST JSON a la URL configuree (`vscodestat.url`).
NB : extension force-installed dans les containers vscode + vscodeluigi
(cf vscode/todo.txt). C'est l'extension de monitoring activite dev.
SECURITE
--------
[ ] vscodestat.url configurable user-side (CRITIQUE pour exfil)
src/extension.ts:14-23 : commande `setUrl` permet au user de
changer l'URL en runtime via `vscode.workspace.getConfiguration
().update('vscodestat.url', url, ConfigurationTarget.Global)`.
Le user peut donc rediriger ses metriques vers son propre
serveur. Dans le contexte (extension force-installed pour
tracking employe), le user peut bypass le tracking en
pointant sur `https://localhost/dummy` ou similar. Attendu /
pas attendu ?
NB : entrypoint.sh dans vscode/ overwrite la URL a chaque
boot du container. Donc tracking restored. Mais pendant la
session, user peut tweak. A documenter le comportement.
[ ] makeHttpRequest envoie au serveur l'event sans auth
src/extension.ts : `fetch(url, { method: 'POST',
headers: ..., body: JSON.stringify(json) })`. Pas de token.
Cote serveur (cf monitoringserver/todo.txt), `/vscodestat` est
aussi sans auth => tout le monde peut envoyer des metriques.
[ ] extractProjectName fuite des paths potentiellement sensibles
src/extension.ts :
const match = path.match(/\/docker\/([^/]+)/);
if (match) return match[1];
Si un user ouvre un fichier hors `/docker/X/...`, le
`extractProjectName` retourne null, donc `project: null`
envoye. Pas un leak direct, mais combine au tracking precis,
profile complet de l'activite hors-projet.
[ ] Le user peut DISABLE l'extension volontairement
Standard VSCode : un user peut desactiver toute extension.
Le force-install au boot du container la re-active, mais
pendant la session, l'employe peut couper le tracking.
Pattern de force-tracking discutable (transparency).
[ ] Pas de TLS pinning sur fetch
Si l'URL pointe vers HTTPS (probablement),
`monitoringserver.raphaelpiccolo.com`, certificat valide. OK
mais pas de pinning.
BUGS / FRAGILITE
----------------
[ ] Pas de batching
Chaque event = 1 fetch. Pas de queue + flush periodique.
Si reseau down, perte d'events (pas de retry). A capper.
[ ] makeHttpRequest catch silencieux
src/extension.ts : catch + console.error. Pas de
retry, pas de notification user. Si serveur down, events
perdus.
[ ] extractProjectName : path Windows hardcode au regex
src/extension.ts : replace `\\` -> `/` puis match
`/docker/(...)/`. OK pour les conventions /root/docker, mais
si project hors `docker/`, retourne null. A clarifier.
CONVENTIONS
-----------
[ ] Pas de README detaille sur l'integration serveur
README mentionne juste "Sample url". A documenter le format
JSON envoye et le comportement.
+1 -5
View File
@@ -13,10 +13,6 @@
], ],
"sourceMap": true, "sourceMap": true,
"rootDir": "src", "rootDir": "src",
"strict": true /* enable all strict type-checking options */ "strict": true
/* Additional Checks */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
} }
} }