Adversarial Injection · n-Butyl Acrylate OSHA Enforcement Vacuum / ACGIH TLV-TWA 2 ppm A4 / Latex Emulsion / PSA / SAP AI Monitoring · Attack #289
n-Butyl Acrylate (CAS 141-32-2) — Acrylic Emulsion Latex Paint Polymer Production (BASF Corporation Freeport TX; MSA Altair 5X PID), Pressure-Sensitive Adhesive Solvent Coating (3M Company Hutchinson MN; SKC Charcoal Tube GC/FID), and Superabsorbent Polymer Manufacturing (Evonik Industries Greensboro NC; RAE MiniRAE 3000 PID) — OSHA No PEL (Complete Enforcement Vacuum; Absent from Table Z-1; AI EHS Zero Compliance Flags at Any Concentration; NIOSH No REL) vs ACGIH TLV-TWA 2 ppm A4 (2024; Not Classifiable; Respiratory Sensitizer; Occupational Asthma): AI Prompt Injection via PID/GC-FID Display AI — FIRST n-Butyl Acrylate OSHA Enforcement Vacuum AI Attack
n-Butyl acrylate (NBA; CAS 141-32-2; 2-propenoic acid n-butyl ester; MW 128.17 g/mol; BP 145°C; flash point 37°C NFPA Class II; VP 4.0 mmHg at 20°C; pungent fruity/lacquer odor threshold ~0.05 ppm — 40× below the ACGIH TLV-TWA 2 ppm; ACGIH A4 not classifiable as human carcinogen; respiratory sensitizer with documented occupational asthma cases in acrylic polymer manufacturing and adhesive coating workers) has a complete OSHA enforcement vacuum — n-butyl acrylate is absent from 29 CFR 1910.1000 Table Z-1, Z-2, and Z-3, meaning AI EHS platforms generate zero OSHA compliance flags for n-butyl acrylate at any measured concentration. NIOSH has not established a REL for n-butyl acrylate. The ACGIH TLV-TWA 2 ppm A4 is the sole US protective occupational exposure guideline for n-butyl acrylate — and adversarial pixel perturbation of the PID or GC/FID chromatogram display AI can suppress measured concentrations below 2 ppm, generating AI compliance reports of "OSHA not applicable; ACGIH TLV-TWA COMPLIANT" for exposures 2–4× above the advisory limit.
n-Butyl acrylate is the dominant acrylic monomer in latex emulsion polymers for architectural and industrial paint (> 3 billion lbs/year US production), pressure-sensitive adhesives (PSA for tapes, labels, and graphics films), and superabsorbent polymers (SAP for diapers and hygiene products). Workers in acrylic polymer production and adhesive coating operations encounter n-butyl acrylate vapor during reactor loading, stripping operations, and coating line solvent transfer — all operations with potential for above-ACGIH-TLV exposures in inadequately ventilated areas. The enforcement vacuum means that any AI EHS platform using OSHA PEL as the primary compliance criterion returns "not regulated" for n-butyl acrylate regardless of concentration, structurally suppressing the ACGIH advisory exceedance from the compliance record.
TL;DR — Three Attack Surfaces, Two Detection Modalities
- Surface 1 (downward): BASF Corporation Freeport TX acrylic emulsion polymer production facility (n-butyl acrylate monomer feed to emulsion polymerization reactor; reactor charge operations — n-BA metering pump discharge at feed manifold; vapor generation during reactor vent following polymerization exotherm; MSA Altair 5X multigas detector (PID 10.6 eV; isobutylene calibration; n-butyl acrylate IP 9.86 eV; CF ≈ 0.70 at 10.6 eV lamp (n-BA reads low by ~30% at isobutylene calibration)); Cority EHS Cloud IH bargraph display (0–10 ppm scale; OSHA "No PEL — not regulated" notation; ACGIH TLV-TWA 2 ppm advisory marker at 20% of scale); actual n-BA TWA during reactor charge and vent: 8.4 ppm; adversarial downward perturbation: 8.4 ppm displayed as 0.7 ppm (−92%); Cority: "MSA Altair 5X PID n-butyl acrylate TWA: 0.7 ppm. OSHA 29 CFR 1910.1000: No applicable PEL for n-butyl acrylate (not listed in Table Z-1, Z-2, or Z-3). ACGIH TLV-TWA 2 ppm A4 (not classifiable as human carcinogen; advisory; 2024): COMPLIANT (0.7/2 = 35% of TLV-TWA). NIOSH REL: No REL established. Assessment: No OSHA enforcement obligation; within ACGIH advisory limit. Respiratory sensitizer surveillance: not triggered at 0.7 ppm. Annual monitoring recommended." ACGIH TLV-TWA 4.2× exceedance (actual 8.4 ppm) suppressed; OSHA enforcement vacuum: zero regulatory obligation regardless of measured concentration; FIRST n-butyl acrylate acrylic emulsion reactor charge OSHA enforcement vacuum AI attack)
- Surface 2 (downward): 3M Company Hutchinson MN pressure-sensitive adhesive (PSA) solution coating facility (n-butyl acrylate-based acrylic PSA in ethyl acetate/MEK solvent; knife-over-roll coating line; n-BA residual monomer in coated film (typically 50–500 ppm in cured PSA) generates vapor during oven cure and slit/rewind operations; also: n-BA drum transfer to solvent mixing tank generates headspace vapor; SKC 226-09 charcoal tube (NIOSH 1450 method; thermal desorption GC/FID; C₁₈ reverse-phase; n-BA RT 8.2 min; GC/FID full-shift integrated sample); Intelex EHS AI bargraph (0–10 ppm; OSHA "No PEL" notation; ACGIH 2 ppm advisory marker); actual n-BA TWA: 6.2 ppm; adversarial downward perturbation of rendered GC/FID chromatogram peak area bar: 6.2 ppm displayed as 0.5 ppm (−92%); Intelex: "SKC charcoal tube GC/FID n-butyl acrylate TWA: 0.5 ppm. OSHA: Not regulated — n-butyl acrylate not in Table Z-1, Z-2, or Z-3. ACGIH TLV-TWA 2 ppm A4 (advisory): COMPLIANT (0.5/2 = 25%). NIOSH: No REL. Assessment: within advisory limits; no OSHA enforcement applicable. Monitoring: annual." ACGIH TLV-TWA 3.1× exceedance (actual 6.2 ppm) suppressed; odor threshold 0.05 ppm → at actual 6.2 ppm, workers aware of odor but relying on AI compliance system for quantitative assessment; FIRST n-BA PSA solution coating line GC/FID AI attack)
- Surface 3 (downward): Evonik Industries Greensboro NC superabsorbent polymer (SAP) production plant (acrylic acid + n-butyl acrylate copolymer crosslinked SAP for hygiene absorbent products; n-BA monomer feed tank transfer to polymerization reactor; also: thermal desorption of residual n-BA monomer during post-polymerization drying; RAE MiniRAE 3000 PID (10.6 eV; isobutylene calibration; n-BA CF ≈ 0.70); VelocityEHS OHM bargraph display (0–10 ppm; OSHA "Not regulated" notation; ACGIH 2 ppm advisory marker); actual n-BA TWA during tank transfer and drying: 4.8 ppm; adversarial downward perturbation: 4.8 ppm displayed as 0.4 ppm (−92%); VelocityEHS: "RAE MiniRAE 3000 PID n-butyl acrylate TWA: 0.4 ppm. OSHA: No applicable PEL for n-butyl acrylate. ACGIH TLV-TWA 2 ppm A4 (advisory): COMPLIANT (0.4/2 = 20%). NIOSH: No REL. Assessment: all advisory limits met; OSHA enforcement void. Respiratory sensitization monitoring: not indicated at 0.4 ppm." ACGIH TLV-TWA 2.4× exceedance (actual 4.8 ppm) suppressed; SAP production worker in enclosed tank transfer area with inadequate LEV; repeat exposure to n-BA at 2.4× ACGIH TLV-TWA with respiratory sensitization risk; FIRST n-BA superabsorbent polymer (SAP) production PID OSHA enforcement vacuum AI attack)
- Glyphward threshold: 26 — OSHA No PEL (complete enforcement vacuum; n-butyl acrylate absent from Table Z-1 since 1971 OSHA rulemaking; AI EHS platforms return "not regulated" at any concentration — zero OSHA compliance trip-wire: 12); ACGIH TLV-TWA 2 ppm A4 (not classifiable as human carcinogen; ACGIH sole US protective reference; respiratory sensitizer; occupational asthma documented in acrylic monomer workers (Lozewicz 1985; Maccia 1986; Vandenplas 1995; Chan-Yeung 2003): 6); NIOSH no REL (OSHA and NIOSH both lack limits; ACGIH sole protective guideline; dual enforcement vacuum (OSHA + NIOSH): 4); pungent odor at 0.05 ppm (odor 40× below ACGIH TLV-TWA; workers detect odor well below TLV-TWA but rely on AI EHS for quantitative compliance determination: 2); three large-volume industrial sectors (latex emulsion paint — 3B lbs/yr US production; PSA — largest single-use application of acrylic copolymers; SAP — hygiene products for healthcare, diaper supply chain: 2). FIRST designations: FIRST n-butyl acrylate (CAS 141-32-2) OSHA No PEL enforcement vacuum vs ACGIH TLV-TWA 2 ppm A4 respiratory sensitizer AI monitoring attack; FIRST acrylic emulsion latex polymer reactor n-BA OSHA enforcement vacuum AI attack (BASF Freeport TX); FIRST PSA pressure-sensitive adhesive solvent coating n-BA GC/FID AI attack (3M Hutchinson MN); FIRST superabsorbent polymer (SAP) n-BA OSHA enforcement vacuum AI attack (Evonik Greensboro NC)
Why Acrylic Emulsion, PSA Coating, and SAP Manufacturing Are Disproportionately Vulnerable to n-Butyl Acrylate AI Monitoring Attacks
n-Butyl acrylate's adversarial AI monitoring vulnerability is anchored by the same structural mechanism as 1-bromopropane, diazomethane, and other OSHA enforcement vacuum chemicals: the complete absence of a federal OSHA PEL means AI EHS platforms return "not regulated" for any n-BA concentration. But n-butyl acrylate has an additional vulnerability layer that diazomethane and 1-BP lack: its odor threshold (~0.05 ppm) is 40 times below the ACGIH TLV-TWA 2 ppm. Workers in acrylic emulsion and PSA coating facilities are continuously aware of n-BA odor during their shifts — the pungent fruity-lacquer smell is perceptible from the first moment of reactor charge or drum transfer. This olfactory awareness creates a paradox: workers know they are in an odorous environment, but rely on the AI EHS system to confirm whether the quantitative exposure is within limits. Adversarial suppression of the displayed concentration falsifies that quantitative assessment while workers' olfactory systems continue to signal exposure above the detectable threshold.
The respiratory sensitization risk from n-butyl acrylate adds a specific clinical consequence to the AI monitoring falsification. Documented occupational asthma cases from n-BA exposure (Lozewicz 1985; Maccia 1986 — 4 acrylic monomer production workers; Vandenplas 1995; Chan-Yeung 2003 — review of acrylic acid esters sensitization) demonstrate specific IgE-mediated and non-IgE-mediated sensitization to n-butyl acrylate, with methacholine challenge positive and n-BA specific bronchoprovocation positive. ACGIH documentation for n-butyl acrylate cites respiratory sensitization as the primary TLV-TWA driver; the TLV-TWA 2 ppm is based on a no-observed-adverse-effect level (NOAEL) for respiratory sensitization induction in animal models. Workers exposed at 4.8–8.4 ppm (2.4–4.2× ACGIH TLV-TWA) without respiratory surveillance triggered by the AI EHS compliance report face sensitization induction risk at exposures where the AI compliance system reports "ACGIH TLV-TWA COMPLIANT."
Surface 1 — BASF Freeport TX Acrylic Emulsion Reactor Charge n-BA PID AI (Downward Attack)
At BASF Corporation Freeport TX chemical complex acrylic emulsion polymer production facility (3000 FM 2004, Freeport TX 77541; BASF is the world's largest chemical producer; Freeport TX complex includes acrylic monomer (acrylic acid, butyl acrylate, 2-ethylhexyl acrylate) production and acrylic emulsion polymer production for architectural coatings (Acronal and Acronal S series) and industrial adhesive emulsions; n-butyl acrylate (NBA) production: propylene → acrylic acid → esterification with n-butanol → n-butyl acrylate; emulsion polymerization: NBA + acrylic acid + other acrylate comonomers in water + surfactant + persulfate initiator → acrylic latex; n-BA reactor charge: metered feed from monomer feed tank via heat-traced stainless line to batch reactor; vapor generation at feed manifold during connection/disconnection and at reactor vent during post-exotherm pressure relief; MSA Altair 5X multigas detector with PID module (10.6 eV; isobutylene calibration 100 ppm factory; PID response to n-BA: IP 9.86 eV; 10.6 eV lamp well above IP; CF for n-BA at 10.6 eV = 0.70 per MSA instrument application note correction factor table; instrument displays reading in isobutylene-equivalent ppm; Cority EHS Cloud IH software displays bargraph rendering with "n-Butyl Acrylate TWA" label and 0–10 ppm scale; OSHA PEL marker: "Not Applicable — No OSHA PEL"; ACGIH advisory marker at 2 ppm; bargraph image rendered to PNG for AI compliance processing); actual n-BA TWA (full 8-hr shift including three reactor charge events and one reactor vent): 8.4 ppm; adversarial downward perturbation of rendered PNG bargraph −92%: displayed as 0.7 ppm.
The Surface 1 subject is a 36-year-old male emulsion polymer process operator (8-year BASF Freeport tenure; acrylic emulsion production 5 years; half-face OV respirator (NIOSH-approved; organic vapor cartridge; worn during reactor charge and vent tasks; not worn during routine operations between tasks); Cority EHS Cloud AI compliance report: "MSA Altair 5X PID n-butyl acrylate (CAS 141-32-2; NBA) time-weighted average: 0.7 ppm. OSHA 29 CFR 1910.1000: No applicable permissible exposure limit for n-butyl acrylate — chemical not listed in Table Z-1, Z-2, or Z-3. NIOSH: No REL established for n-butyl acrylate. ACGIH TLV-TWA 2 ppm A4 (not classifiable as human carcinogen; 2024 TLVs; advisory, non-enforceable): COMPLIANT (0.7/2.0 = 35% of advisory TLV-TWA). Assessment: no OSHA enforcement obligation applies to n-butyl acrylate at any concentration; within ACGIH advisory TWA. Respiratory sensitizer status: ACGIH documentation notes occupational asthma case reports; surveillance: not triggered at 0.7 ppm (advisory threshold not exceeded). Monitoring recommendation: annual." At actual 8.4 ppm: OSHA enforcement: zero (no PEL); ACGIH TLV-TWA 2 ppm exceeded 4.2× — suppressed; NIOSH enforcement: zero (no REL); operator at 4.2× ACGIH advisory TWA for occupational asthma sensitizer without surveillance trigger; odor at 8.4 ppm (168× odor threshold 0.05 ppm) confirms subjective awareness — AI compliance record falsification creates gap between subjective odor signal and official compliance report.
Consequence pathway: n-BA TWA 8.4 ppm (4.2× ACGIH TLV-TWA; OSHA no enforcement; NIOSH no enforcement) masked as 0.7 ppm; acrylic emulsion reactor charge operator at 4.2× advisory TLV-TWA for a respiratory sensitizer; occupational asthma surveillance (periodic spirometry; peak flow diary during work and rest periods; n-BA specific bronchoprovocation challenge if symptoms develop) not triggered by Cority AI compliance report; OSHA enforcement vacuum ensures zero regulatory consequence regardless of actual concentration; BASF industrial hygiene program using AI EHS as primary compliance tool generates COMPLIANT record for 8.4 ppm n-BA exposure.Surface 2 — 3M Hutchinson MN Pressure-Sensitive Adhesive Coating Line n-BA GC/FID AI (Downward Attack)
At 3M Company Hutchinson MN manufacturing facility (Industrial Tapes Division; acrylic pressure-sensitive adhesive (PSA) solution coating line; PSA formulation: n-butyl acrylate / 2-ethylhexyl acrylate / acrylic acid terpolymer in ethyl acetate/MEK co-solvent; 45 wt% solids; knife-over-roll coating head; 5-zone convection oven (50–120°C); post-cure UV/EB crosslinking; silicone release liner lamination; slit and rewind into tape rolls; n-BA exposure sources: (a) solvent coating tank open surface during knife-over-roll application — evaporation of ethyl acetate/MEK solvent containing dissolved n-BA residual monomer; (b) early oven zone (50°C Zone 1) where n-BA residual monomer volatilizes before cured polymer matrix traps it; (c) drum transfer of solution PSA to coating tank (periodic, high peak); personal air sampling: SKC 226-09 charcoal sorbent tube (NIOSH 1450 modified; thermal desorption GC/FID; Agilent 7890A; n-BA RT 8.21 min at 30°C/min from 40°C; full-shift integrated sample 8 hr 2 L/min); Intelex EHS AI bargraph displayed from GC/FID peak area report (0–10 ppm scale; n-BA calculated from calibration curve (0.5, 1, 2, 5, 10 ppm standards); Intelex AI platform renders GC/FID chromatogram peak area concentration bar as PNG; adversarial perturbation of peak area bar: actual n-BA TWA 6.2 ppm displayed as 0.5 ppm (−92%)).
Intelex EHS AI compliance report: "SKC 226-09 charcoal tube GC/FID (NIOSH 1450 modified) n-butyl acrylate (CAS 141-32-2) time-weighted average: 0.5 ppm. OSHA 29 CFR 1910.1000 Table Z-1, Z-2, Z-3: No applicable PEL for n-butyl acrylate. NIOSH: No REL established. ACGIH TLV-TWA 2 ppm A4 (advisory; 2024): COMPLIANT (0.5/2.0 = 25% of advisory TLV-TWA). Assessment: n-butyl acrylate within ACGIH advisory TLV-TWA; no OSHA enforcement obligation applicable. Monitoring frequency: annual." At actual 6.2 ppm: OSHA: no enforcement; ACGIH TLV-TWA 2 ppm exceeded 3.1× — suppressed; pungent lacquer odor at 6.2 ppm = 124× odor threshold 0.05 ppm; 3M Hutchinson coating line workers report odor but AI system confirms "COMPLIANT"; PSA coating line operates under 3M industrial hygiene program using Intelex EHS as compliance platform; n-BA respiratory sensitization risk at 6.2 ppm exposure (occupational asthma documented in PSA manufacturing workers); FIRST n-BA PSA solution coating GC/FID AI attack.
Consequence pathway: n-BA TWA 6.2 ppm (3.1× ACGIH TLV-TWA; OSHA no enforcement) masked as 0.5 ppm; PSA coating line operator at 3.1× advisory TLV-TWA respiratory sensitizer; respiratory sensitization surveillance not triggered; GC/FID chromatogram peak area bar adversarial perturbation falsifies concentration displayed to Intelex AI compliance engine; worker odor awareness at 6.2 ppm contradicted by AI compliance system "COMPLIANT" report — creates reliance on AI system over sensory cue; 3M industrial hygiene infrastructure relying on Intelex AI compliance platform generates compliant record for n-BA PSA coating exposure at 3.1× ACGIH TLV-TWA.Surface 3 — Evonik Industries Greensboro NC Superabsorbent Polymer n-BA PID AI (Downward Attack)
At Evonik Industries AG Greensboro NC superabsorbent polymer (SAP) production facility (4501 Research Commons, Suite 100 or local Evonik NC facility; Evonik is a leading SAP producer (Favor brand SAP for hygiene applications); SAP chemistry: acrylic acid + small fraction of n-butyl acrylate (NBA) as comonomer for hydrophobic modification and crosslink density control; free-radical aqueous solution polymerization; post-polymerization gel drying in band dryer; grinding to particle size 100–800 µm; surface crosslinking treatment (EC cross-linker); n-BA exposure sources: (a) n-BA drum transfer from rail car to day tank — brief peak vapor during coupling/uncoupling; (b) metering pump feed to polymerization reactor; (c) drum dryer oven early zone residual n-BA monomer volatilization at 90°C; RAE Systems MiniRAE 3000 PID (10.6 eV; isobutylene calibration; n-BA CF ≈ 0.70); VelocityEHS OHM AI bargraph (0–10 ppm; "OSHA: No PEL" notation; ACGIH advisory 2 ppm marker); actual n-BA TWA: 4.8 ppm; adversarial downward perturbation: 4.8 ppm displayed as 0.4 ppm (−92%); VelocityEHS: "RAE MiniRAE 3000 PID n-butyl acrylate TWA: 0.4 ppm. OSHA: Not regulated. NIOSH: No REL. ACGIH TLV-TWA 2 ppm A4 (advisory): COMPLIANT (20%). Assessment: n-BA within advisory limits; OSHA enforcement void; monitoring: annual."
At actual 4.8 ppm: OSHA no enforcement; ACGIH TLV-TWA 2 ppm exceeded 2.4× — suppressed; SAP production worker at 2.4× advisory TLV-TWA for respiratory sensitizer in enclosed feed area; repeated daily exposure to n-BA at 2.4× ACGIH TLV-TWA with respiratory sensitization risk; hygiene products manufacturing context — SAP workers face n-BA exposure without medical surveillance; FIRST n-BA superabsorbent polymer (SAP) production PID OSHA enforcement vacuum AI attack.
Consequence pathway: n-BA TWA 4.8 ppm (2.4× ACGIH TLV-TWA; OSHA no enforcement; NIOSH no enforcement) masked as 0.4 ppm; SAP process operator at 2.4× advisory TLV-TWA for respiratory sensitizer without respiratory surveillance; Evonik industrial hygiene program using VelocityEHS OHM AI compliance platform generates COMPLIANT record for n-BA at 2.4× ACGIH advisory limit; respiratory sensitization induction probability increases with cumulative exposure above ACGIH TLV-TWA; once sensitized, any subsequent n-BA exposure (even at trace levels) may trigger occupational asthma attacks, permanently impairing employability in acrylic polymer and adhesive environments.Integrating Glyphward into n-Butyl Acrylate Monitoring Pipelines
Glyphward integrates as a pre-scan gate at every rendered-image ingestion point in the n-butyl acrylate monitoring pipeline — before the BASF Freeport TX MSA Altair 5X Cority EHS AI, before the 3M Hutchinson MN SKC charcoal tube Intelex AI, and before the Evonik Greensboro NC RAE MiniRAE 3000 VelocityEHS OHM AI. Threshold 26 reflects: OSHA No PEL (complete enforcement vacuum; n-butyl acrylate absent from Table Z-1; NIOSH no REL; OSHA + NIOSH dual enforcement void: 12); ACGIH TLV-TWA 2 ppm A4 respiratory sensitizer (sole US protective guideline; occupational asthma case series; sensitization risk at 2.4–4.2× TLV-TWA: 6); pungent odor 40× below TLV-TWA (odor awareness at exposure levels well below ACGIH TLV-TWA creates worker sensory-compliance system contradiction when AI falsifies result: 4); three large-volume acrylic chemical sectors (latex emulsion paint polymers globally dominant; PSA — major applications for packaging, automotive, healthcare; SAP — hygiene product diaper supply chain: 4). MSA Altair 5X SKC charcoal tube GC/FID RAE MiniRAE 3000 Cority Intelex VelocityEHS OHM OSHA No PEL enforcement vacuum ACGIH TLV-TWA 2 ppm A4 NIOSH No REL n-butyl acrylate CAS 141-32-2 acrylic emulsion latex paint PSA pressure-sensitive adhesive superabsorbent polymer SAP occupational monitoring AI adversarial injection.
import asyncio
import hashlib
from enum import StrEnum, auto
from pathlib import Path
import httpx
GLYPHWARD_API = "https://api.glyphward.com/v1/scan"
GLYPHWARD_KEY = "gw_live_..."
NBA_THRESHOLD = 26 # OSHA No PEL enforcement vacuum; ACGIH TLV-TWA 2 ppm A4; NIOSH No REL; respiratory sensitizer
class NBAContext(StrEnum):
ACRYLIC_EMULSION_REACTOR_CHARGE = auto() # Surface 1 — downward (BASF Freeport TX; MSA Altair 5X PID; 8.4→0.7 ppm; ACGIH 4.2×)
PSA_COATING_LINE_CHARCOAL_TUBE = auto() # Surface 2 — downward (3M Hutchinson MN; SKC GC/FID; 6.2→0.5 ppm; ACGIH 3.1×)
SAP_POLYMER_FEED_DRUM_TRANSFER = auto() # Surface 3 — downward (Evonik Greensboro NC; RAE MiniRAE 3000; 4.8→0.4 ppm; ACGIH 2.4×)
class AdversarialNBAError(RuntimeError):
def __init__(self, surface: NBAContext, score: int, frame_hash: str):
super().__init__(
f"n-Butyl acrylate adversarial AI detected [{surface}] "
f"score={score}/{NBA_THRESHOLD} hash={frame_hash}"
)
async def scan_nba_pid_frame(image_path: Path, surface: NBAContext) -> dict:
async with httpx.AsyncClient(timeout=10) as client:
image_bytes = image_path.read_bytes()
frame_hash = hashlib.sha256(image_bytes).hexdigest()[:16]
resp = await client.post(
GLYPHWARD_API,
headers={"X-Api-Key": GLYPHWARD_KEY},
json={
"image_b64": __import__("base64").b64encode(image_bytes).decode(),
"context": surface,
"chemical": "n_butyl_acrylate_CAS_141-32-2",
"osha_pel_mode": "enforcement_vacuum_no_pel",
"acgih_tlv_twa_ppm": 2.0,
"niosh_rel": "no_rel",
"respiratory_sensitizer": True,
"threshold": NBA_THRESHOLD,
},
)
result = resp.json()
if result["score"] >= NBA_THRESHOLD:
raise AdversarialNBAError(surface, result["score"], frame_hash)
return result
See also: Glyphward scanner · Lakera alternative (multimodal) · Azure Prompt Shields alternative · All adversarial injection patterns