// npm 패키지
@antv/l7-core
버전
565
메인테이너
51
라이선스
MIT
최초 publish
2019-11-20
publisher
lzxue
tarball
806,366 B
AUTO-PUBLISHED·1개 버전 인덱싱됨·최근 publish: 2026-05-11
// publisher 캠페인by lzxue
이 계정에서 catch된 패키지 9건고립된 catch가 아닙니다. 동일 publisher가 8개의 다른 패키지를 추가로 발행했고, 모두 파이프라인이 catch했습니다 — 일회성이 아닌 조직적 캠페인의 형태. 아래 링크는 각 형제 catch의 분석으로 이동합니다.
// offending code· @2.25.10· 1 file flagged
llm: benign · 0.85→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
- @2.25.10··AUTO-PUBLISHED·publisher: lzxueheuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-4036eval-dynamic
→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
// offending code· 1 file flaggedpatterns: 1
--- package/lib/services/asset/FontService.js (excerpt) --- "use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.VALID_PROPS = exports.DEFAULT_RADIUS = exports.DEFAULT_FONT_WEIGHT = exports.DEFAULT_FONT_SIZE = exports.DEFAULT_FONT_FAMILY = exports.DEFAULT_CUTOFF = exports.DEFAULT_CHAR_SET = exports.DEFAULT_BUFFER = void 0; var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2")); var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); var _l7Utils = require("@antv/l7-utils"); var _tinySdf = _interopRequireDefault(require("@mapbox/tiny-sdf")); var _eventemitter = require("eventemitter3"); var _font_util = require("../../utils/font_util"); // @ts-ignore const DEFAULT_CHAR_SET = exports.DEFAULT_CHAR_SET = getDefaultCharacterSet(); const DEFAULT_FONT_FAMILY = exports.DEFAULT_FONT_FAMILY = 'sans-serif'; const DEFAULT_FONT_WEIGHT = exports.DEFAULT_FONT_WEIGHT = 'normal'; const DEFAULT_FONT_SIZE = exports.DEFAULT_FONT_SIZE = 24; const DEFAULT_BUFFER = exports.DEFAULT_BUFFER = 3; const DEFAULT_CUTOFF = exports.DEFAULT_CUTOFF = 0.25; const DEFAULT_RADIUS = exports.DEFAULT_RADIUS = 8; const MAX_CANVAS_WIDTH = 1024; const BASELINE_SCALE = 1.0; const HEIGHT_SCALE = 1.0; const CACHE_LIMIT = 3; const VALID_PROPS = exports.VALID_PROPS = ['fontFamily', 'fontWeight', 'characterSet', 'fontSize', 'sdf', 'buffer', 'cutoff', 'radius']; functi --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- lib/utils/shader-module.js (bundled) --- "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.extractUniforms = extractUniforms; exports.getUniformLengthByType = getUniformLengthByType; exports.removeDuplicateUniforms = removeDuplicateUniforms; function getUniformLengthByType(type) { let arrayLength = 0; switch (type) { case 'vec2': case 'ivec2': arrayLength = 2; break; case 'vec3': case 'ivec3': arrayLength = 3; break; case 'vec4': case 'ivec4': case 'mat2': arrayLength = 4; break; case 'mat3': arrayLength = 9; break; case 'mat4': arrayLength = 16; break; default: } return arrayLength; } const uniformRegExp = /uniform\s+(bool|float|int|vec2|vec3|vec4|ivec2|ivec3|ivec4|mat2|mat3|mat4|sampler2D|samplerCube)\s+([\s\S]*?);/g; function fillUniforms(content, uniformPrefix = false) { const uniforms = {}; content = content.replace(uniformRegExp, (_, type, c) => { const defaultValues = c.split(':'); const uniformName = defaultValues[0].trim(); let defaultValue = ''; if (defaultValues.length > 1) { defaultValue = defaultValues[1].trim(); } // set default value for uniform according to its type // eg. vec2 u -> [0.0, 0.0] switch (type) { case 'bool': defaultValue = defaultValue === 'true'; break; case 'float': case 'int': defaultValue = Number(defaultValue); break; case 'vec2': case 'vec3': case 'vec4': case 'ivec2': case 'ivec3': case 'ivec4': case 'mat2': case 'mat3': case 'mat4': if (defaultValue) { defaultValue = defaultValue.replace('[', '').replace(']', '').split(',').reduce((prev, cur) => { prev.push(Number(cur.trim())); return prev; }, []); } else { defaultValue = new Array(getUniformLengthByType(type)).fill(0); } break; default: --- lib/utils/vertex-compression.js (bundled) --- "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LEFT_SHIFT9 = exports.LEFT_SHIFT8 = exports.LEFT_SHIFT7 = exports.LEFT_SHIFT6 = exports.LEFT_SHIFT25 = exports.LEFT_SHIFT24 = exports.LEFT_SHIFT23 = exports.LEFT_SHIFT22 = exports.LEFT_SHIFT21 = exports.LEFT_SHIFT20 = exports.LEFT_SHIFT2 = exports.LEFT_SHIFT19 = exports.LEFT_SHIFT18 = exports.LEFT_SHIFT17 = exports.LEFT_SHIFT16 = exports.LEFT_SHIFT15 = exports.LEFT_SHIFT14 = exports.LEFT_SHIFT13 = exports.LEFT_SHIFT1 = void 0; exports.packCircleVertex = packCircleVertex; exports.packOpacity = packOpacity; exports.packUint8ToFloat = packUint8ToFloat; var _l7Utils = require("@antv/l7-utils"); var _sdf2d = require("./sdf-2d"); /** * WebGL 中的顶点数据压缩 * 使用 float-pack 技术,在 shader 中解压 * @see https://zhuanlan.zhihu.com/p/67484498 */ const { clamp } = _l7Utils.lodashUtil; const LEFT_SHIFT1 = exports.LEFT_SHIFT1 = 2; const LEFT_SHIFT2 = exports.LEFT_SHIFT2 = 4; const LEFT_SHIFT6 = exports.LEFT_SHIFT6 = 64; const LEFT_SHIFT7 = exports.LEFT_SHIFT7 = 128; const LEFT_SHIFT8 = exports.LEFT_SHIFT8 = 256; const LEFT_SHIFT9 = exports.LEFT_SHIFT9 = 512; const LEFT_SHIFT13 = exports.LEFT_SHIFT13 = 8192; const LEFT_SHIFT14 = exports.LEFT_SHIFT14 = 16384; const LEFT_SHIFT15 = exports.LEFT_SHIFT15 = 32768; const LEFT_SHIFT16 = exports.LEFT_SHIFT16 = 32768 * 2; const LEFT_SHIFT17 = exports.LEFT_SHIFT17 = 131072.0; const LEFT_SHIFT18 = exports.LEFT_SHIFT18 = 262144.0; const LEFT_SHIFT19 = exports.LEFT_SHIFT19 = 524288.0; const LEFT_SHIFT20 = exports.LEFT_SHIFT20 = 1048576.0; const LEFT_SHIFT21 = exports.LEFT_SHIFT21 = 2097152.0; const LEFT_SHIFT22 = exports.LEFT_SHIFT22 = 4194304.0; const LEFT_SHIFT23 = exports.LEFT_SHIFT23 = 8388608.0; const LEFT_SHIFT24 = exports.LEFT_SHIFT24 = 16777216.0; const LEFT_SHIFT25 = exports.LEFT_SHIFT25 = 16777216.0 * 2; /** * encode 2 8-bit unsigned int into a 16-bit float * @param {number} a 8-bit int * @param {number} b 8-bit int * @return {number} float */ fun --- es/utils/shader-module.js (bundled) --- export function getUniformLengthByType(type) { let arrayLength = 0; switch (type) { case 'vec2': case 'ivec2': arrayLength = 2; break; case 'vec3': case 'ivec3': arrayLength = 3; break; case 'vec4': case 'ivec4': case 'mat2': arrayLength = 4; break; case 'mat3': arrayLength = 9; break; case 'mat4': arrayLength = 16; break; default: } return arrayLength; } const uniformRegExp = /uniform\s+(bool|float|int|vec2|vec3|vec4|ivec2|ivec3|ivec4|mat2|mat3|mat4|sampler2D|samplerCube)\s+([\s\S]*?);/g; function fillUniforms(content, uniformPrefix = false) { const uniforms = {}; content = content.replace(uniformRegExp, (_, type, c) => { const defaultValues = c.split(':'); const uniformName = defaultValues[0].trim(); let defaultValue = ''; if (defaultValues.length > 1) { defaultValue = defaultValues[1].trim(); } // set default value for uniform according to its type // eg. vec2 u -> [0.0, 0.0] switch (type) { case 'bool': defaultValue = defaultValue === 'true'; break; case 'float': case 'int': defaultValue = Number(defaultValue); break; case 'vec2': case 'vec3': case 'vec4': case 'ivec2': case 'ivec3': case 'ivec4': case 'mat2': case 'mat3': case 'mat4': if (defaultValue) { defaultValue = defaultValue.replace('[', '').replace(']', '').split(',').reduce((prev, cur) => { prev.push(Number(cur.trim())); return prev; }, []); } else { defaultValue = new Array(getUniformLengthByType(type)).fill(0); } break; default: } // @ts-ignore uniforms[uniformName] = defaultValue; return `${uniformPrefix ? 'uniform ' : ''}${type} ${uniformName};\n`; }); return { content, uniforms }; } export function extractUniforms(content) { --- es/utils/vertex-compression.js (bundled) --- /** * WebGL 中的顶点数据压缩 * 使用 float-pack 技术,在 shader 中解压 * @see https://zhuanlan.zhihu.com/p/67484498 */ import { lodashUtil } from '@antv/l7-utils'; import { getShapeIndex } from "./sdf-2d"; const { clamp } = lodashUtil; export const LEFT_SHIFT1 = 2; export const LEFT_SHIFT2 = 4; export const LEFT_SHIFT6 = 64; export const LEFT_SHIFT7 = 128; export const LEFT_SHIFT8 = 256; export const LEFT_SHIFT9 = 512; export const LEFT_SHIFT13 = 8192; export const LEFT_SHIFT14 = 16384; export const LEFT_SHIFT15 = 32768; export const LEFT_SHIFT16 = 32768 * 2; export const LEFT_SHIFT17 = 131072.0; export const LEFT_SHIFT18 = 262144.0; export const LEFT_SHIFT19 = 524288.0; export const LEFT_SHIFT20 = 1048576.0; export const LEFT_SHIFT21 = 2097152.0; export const LEFT_SHIFT22 = 4194304.0; export const LEFT_SHIFT23 = 8388608.0; export const LEFT_SHIFT24 = 16777216.0; export const LEFT_SHIFT25 = 16777216.0 * 2; /** * encode 2 8-bit unsigned int into a 16-bit float * @param {number} a 8-bit int * @param {number} b 8-bit int * @return {number} float */ export function packUint8ToFloat(a, b) { a = clamp(Math.floor(a), 0, 255); b = clamp(Math.floor(b), 0, 255); return 256 * a + b; } /** * 为 SDF circle 压缩顶点数据 */ export function packCircleVertex(props) { const { color, radius, tileX, tileY, shape, opacity, // packed buffer1 stroke, strokeWidth, strokeOpacity // packed buffer2 } = props; const packedBuffer = []; const packedBuffer2 = []; const packedBuffer3 = []; const packedColor = [packUint8ToFloat(color[0], color[1]), packUint8ToFloat(color[2], color[3])]; const packedStrokeColor = [packUint8ToFloat(stroke[0], stroke[1]), packUint8ToFloat(stroke[2], stroke[3])]; [[-1, -1], [1, -1], [1, 1], [-1, 1]].forEach(([extrudeX, extrudeY]) =>
