// npm 패키지
babel-plugin-version
babel plugin replace define Identifier / StringLiteral `__VERSION__` to pkg.version!
버전
5
메인테이너
1
라이선스
MIT
최초 publish
2018-11-15
publisher
atool
tarball
2,485 B
AUTO-PUBLISHED·1개 버전 인덱싱됨·최근 publish: 2018-11-26
// publisher 캠페인by atool
이 계정에서 catch된 패키지 9건고립된 catch가 아닙니다. 동일 publisher가 8개의 다른 패키지를 추가로 발행했고, 모두 파이프라인이 catch했습니다 — 일회성이 아닌 조직적 캠페인의 형태. 아래 링크는 각 형제 catch의 분석으로 이동합니다.
// offending code· @0.2.3· no static-pattern hits
llm: benign · 0.85→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
- @0.2.3··AUTO-PUBLISHED·publisher: atoolheuristic 75/100static flags 0llm benign (0.85) via ollamapublisher-multi-name-burst:5osv-flagged:MAL-2026-4129
→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
// offending code· no static-pattern hits
--- package.json (entry) --- { "name": "babel-plugin-version", "version": "0.2.3", "description": "babel plugin replace define Identifier / StringLiteral `__VERSION__` to pkg.version!", "main": "src/index.js", "scripts": { "test": "rm -rf lib && babel test -d lib" }, "keywords": [ "babel-plugin", "version" ], "devDependencies": { "babel-cli": "^6.26.0" }, "license": "MIT" } --- index.js (entry) --- 'use strict'; var fs = require('fs'); var version = JSON.parse(fs.readFileSync('package.json', 'utf8')).version; module.exports = function (_ref) { var t = _ref.types; return { visitor: { // __VERSION__ ReferencedIdentifier: function(path, state) { var identifier = state.opts.identifier; var transform = identifier === undefined ? true : identifier; // 默认转换 var define = state.opts.define || '__VERSION__'; // 默认值 if (transform && path.node.name === define) { path.replaceWith(t.valueToNode(version)); } }, // "__VERSION__" StringLiteral: function(path, state) { var stringLiteral = state.opts.stringLiteral; var transform = stringLiteral === undefined ? true : stringLiteral; var define = state.opts.define || '__VERSION__'; if (transform && path.node.value === define) { path.replaceWith(t.valueToNode(version)); } } } }; };
