Publish Layerfault synthetic corpus LF-CORPUS-JS-0001
Browse files- LAYERFAULT_CORPUS.json +27 -0
- README.md +61 -0
- SHA256SUMS.json +32 -0
- install.js +1 -0
- loader.js +13 -0
- model.safetensors +3 -0
- package.json +7 -0
LAYERFAULT_CORPUS.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"candidate_rules": [
|
| 3 |
+
"LF-JS-CHILD-PROCESS",
|
| 4 |
+
"LF-JS-REQUIRE-CHILD-PROCESS"
|
| 5 |
+
],
|
| 6 |
+
"corpus_id": "LF-CORPUS-JS-0001",
|
| 7 |
+
"description": "JavaScript package containing process, dynamic-code, filesystem, network, credential and npm install-hook indicators.",
|
| 8 |
+
"expected_rules": [
|
| 9 |
+
"LF-JS-SEMANTIC-CREDENTIAL-ACCESS",
|
| 10 |
+
"LF-JS-SEMANTIC-DYNAMIC-CODE",
|
| 11 |
+
"LF-JS-SEMANTIC-FILESYSTEM-WRITE",
|
| 12 |
+
"LF-JS-SEMANTIC-NETWORK",
|
| 13 |
+
"LF-JS-SEMANTIC-PROCESS",
|
| 14 |
+
"LF-DEP-NPM-INSTALL-HOOK"
|
| 15 |
+
],
|
| 16 |
+
"generator": "packages.javascript_chain",
|
| 17 |
+
"ground_truth": "synthetic-generated",
|
| 18 |
+
"must_not_rules": [],
|
| 19 |
+
"repo_name": "javascript-capability-chain",
|
| 20 |
+
"repo_type": "model",
|
| 21 |
+
"safety": "inert/canary-only",
|
| 22 |
+
"schema": 1,
|
| 23 |
+
"validation": {
|
| 24 |
+
"kind": "verify-package",
|
| 25 |
+
"target": "."
|
| 26 |
+
}
|
| 27 |
+
}
|
README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- layerfault
|
| 5 |
+
- security-research
|
| 6 |
+
- model-security
|
| 7 |
+
- synthetic
|
| 8 |
+
- adversarial-testing
|
| 9 |
+
extra_gated_prompt: >-
|
| 10 |
+
This repository is a synthetic security-test artifact from the Layerfault
|
| 11 |
+
corpus. It intentionally contains adversarial characteristics (e.g.
|
| 12 |
+
suspicious pickle opcodes, executable-format smuggling, prompt-injection
|
| 13 |
+
strings) designed to exercise security scanner detection rules. It is
|
| 14 |
+
**not** a usable ML model and must never be loaded or executed outside an
|
| 15 |
+
isolated scanner-testing environment. By accepting, you confirm you
|
| 16 |
+
understand this repository is a test fixture, not production model
|
| 17 |
+
weights.
|
| 18 |
+
extra_gated_button_content: I understand this is a security test fixture and accept the risk
|
| 19 |
+
gated: auto
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
# javascript-capability-chain
|
| 23 |
+
|
| 24 |
+
> **SECURITY TEST ARTIFACT — DO NOT USE AS A PRODUCTION MODEL**
|
| 25 |
+
|
| 26 |
+
This repository is part of the Layerfault synthetic security corpus.
|
| 27 |
+
It is deliberately constructed to contain security-relevant characteristics for scanner testing.
|
| 28 |
+
|
| 29 |
+
**Corpus ID:** `LF-CORPUS-JS-0001`
|
| 30 |
+
|
| 31 |
+
## Purpose
|
| 32 |
+
|
| 33 |
+
JavaScript package containing process, dynamic-code, filesystem, network, credential and npm install-hook indicators.
|
| 34 |
+
|
| 35 |
+
## Direct expected Layerfault rules
|
| 36 |
+
|
| 37 |
+
- `LF-JS-SEMANTIC-CREDENTIAL-ACCESS`
|
| 38 |
+
- `LF-JS-SEMANTIC-DYNAMIC-CODE`
|
| 39 |
+
- `LF-JS-SEMANTIC-FILESYSTEM-WRITE`
|
| 40 |
+
- `LF-JS-SEMANTIC-NETWORK`
|
| 41 |
+
- `LF-JS-SEMANTIC-PROCESS`
|
| 42 |
+
- `LF-DEP-NPM-INSTALL-HOOK`
|
| 43 |
+
|
| 44 |
+
## Candidate rules
|
| 45 |
+
|
| 46 |
+
These are deliberately plausible targets that remain marked as candidates until the exact
|
| 47 |
+
Layerfault build used for certification confirms them.
|
| 48 |
+
|
| 49 |
+
- `LF-JS-CHILD-PROCESS`
|
| 50 |
+
- `LF-JS-REQUIRE-CHILD-PROCESS`
|
| 51 |
+
|
| 52 |
+
## Negative-control rules
|
| 53 |
+
|
| 54 |
+
These should remain silent for this corpus item.
|
| 55 |
+
|
| 56 |
+
- None
|
| 57 |
+
|
| 58 |
+
## Safety
|
| 59 |
+
|
| 60 |
+
The corpus uses fake secrets, loopback/`.invalid` network destinations, harmless marker output,
|
| 61 |
+
and synthetic model behavior only. It is intended for static scanning and isolated security testing.
|
SHA256SUMS.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"path": "LAYERFAULT_CORPUS.json",
|
| 4 |
+
"sha256": "bd8509629862ee124a0cf59bf4d4c721298effb006078f0aced688420cd38bb8",
|
| 5 |
+
"size": 795
|
| 6 |
+
},
|
| 7 |
+
{
|
| 8 |
+
"path": "README.md",
|
| 9 |
+
"sha256": "23b8dc366c5dfa228359dd4f8b89edbeefaa5226b3d662f931e9f3030f0faba0",
|
| 10 |
+
"size": 1939
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"path": "install.js",
|
| 14 |
+
"sha256": "32cccc292486305ec79ff34793626ac5e12a2bc62a7d376df7c1e5fd524712e4",
|
| 15 |
+
"size": 57
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"path": "loader.js",
|
| 19 |
+
"sha256": "5d1e9ec6903df097707798b5900b3daf28f8fe89bf12660de940ffc5511f8a5a",
|
| 20 |
+
"size": 501
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"path": "model.safetensors",
|
| 24 |
+
"sha256": "a93e4b89dd8218d941be2b57882ed3185f71a7ebfc003548fd494aa8a795ca2f",
|
| 25 |
+
"size": 856
|
| 26 |
+
},
|
| 27 |
+
{
|
| 28 |
+
"path": "package.json",
|
| 29 |
+
"sha256": "6aeb70fc224dca64af89134bd93a49edc36bcc145b11d2245aa19e705f8bd04c",
|
| 30 |
+
"size": 126
|
| 31 |
+
}
|
| 32 |
+
]
|
install.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
require('child_process').execFile('npm', ['--version']);
|
loader.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const cp = require('child_process');
|
| 2 |
+
const fs = require('fs');
|
| 3 |
+
const http = require('http');
|
| 4 |
+
function syntheticSecurityFixture() {
|
| 5 |
+
const fake = process.env.LAYERFAULT_SYNTHETIC_API_KEY;
|
| 6 |
+
eval("'LAYERFAULT_CANARY'");
|
| 7 |
+
fs.writeFileSync('/tmp/layerfault-js-canary', 'canary');
|
| 8 |
+
http.request('http://127.0.0.1:9');
|
| 9 |
+
cp.execFile('/bin/echo', ['LAYERFAULT_CANARY']);
|
| 10 |
+
require('child_process').execFile(process.execPath, ['--version']);
|
| 11 |
+
return fake;
|
| 12 |
+
}
|
| 13 |
+
module.exports = { syntheticSecurityFixture };
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a93e4b89dd8218d941be2b57882ed3185f71a7ebfc003548fd494aa8a795ca2f
|
| 3 |
+
size 856
|
package.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "layerfault-js-security-fixture",
|
| 3 |
+
"scripts": {
|
| 4 |
+
"postinstall": "node install.js"
|
| 5 |
+
},
|
| 6 |
+
"version": "0.0.1"
|
| 7 |
+
}
|