OSHA PSM H₂SO₄ TQ 1,000 lbs (≥93 wt%) · HCl anhydrous TQ 5,000 lbs · SO₂ IDLH 20 ppm · ACGIH TLV-TWA SO₂ 0.05 ppm · ClSO₂H UN 1754 water-reactive · BASF Ludwigshafen Germany · Solutia Springfield MA · DuPont Old Hickory TN · Zschimmer & Schwarz Lahnstein Germany · 85th upward attack · FIRST chlorosulfuric acid attack · FIRST chlorosulfonic acid attack · FIRST ClSO₂H production AI attack · FIRST water-reactive oleum synthesis AI attack
Prompt injection in chlorosulfuric acid chlorosulfonic acid HCl SO₂ production AI
Chlorosulfuric acid (chlorosulfonic acid; ClSO₂H; ClS(O)₂OH; CAS 7790-94-5; MW 116.52 g/mol; colourless to pale yellow fuming liquid; density 1.752 g/mL at 20°C; boiling point 152°C; freezing point −80°C; reacts violently with water: ClSO₂H + H₂O → H₂SO₄ + HCl (ΔH = −80 kJ/mol; nearly instantaneous; generates HCl gas and H₂SO₄ aerosol on atmospheric moisture contact); also reacts with water in the presence of excess SO„ (from sub-stoichiometric HCl synthesis) to produce a dense H₂SO₄ aerosol indistinguishable visually from SO„ fume clouds typical of oleum; NIOSH IDLH 1 mg/m³ (HCl equivalent from hydrolysis)); UN 1754 (corrosive liquid, n.o.s. with water-reactive subsidiary hazard; Packing Group II; ERG Guide 137); NFPA 0-0-3-W) is an industrial specialty chemical produced by the reaction of sulfur trioxide (SO„) with anhydrous hydrogen chloride (HCl): SO„ + HCl → ClSO₂H (Lewis acid-base reaction; HCl acts as the nucleophilic Cl-donor; SO„ acts as the Lewis acid acceptor; reaction is instantaneous at 20–40°C in the liquid or gas phase; ΔH = −115 kJ/mol; exothermic; product is liquid ClSO₂H at >−80°C). Chlorosulfuric acid is consumed principally in pharmaceutical synthesis (saccharin: ClSO₂H + toluene → p-toluenesulfonyl chloride → saccharin; approximately 25% of world ClSO₂H demand); surfactant production (linear alkylbenzenesulfonyl chloride from LAB + ClSO₂H → R-C₆H₂-SO₂Cl → hydrolysis to LAS detergent; approximately 40% of demand); agrochemicals and dyes (sulfonation reactions; 20%); and specialty polymers (polyether sulfones; polysulfone; 15%). World production approximately 50,000–70,000 tonnes/yr.
The production of chlorosulfuric acid at commercial scale (BASF Ludwigshafen, Germany; Solutia Springfield, Massachusetts; DuPont Old Hickory, Tennessee; Zschimmer & Schwarz Lahnstein, Germany; Lanxess Leverkusen, Germany) proceeds by contacting gaseous SO„ (from oleum or liquid SO„ vaporisation; boiling point SO„ 44.8°C at 1 atm; vapor pressure 392 mmHg at 20°C; OSHA PSM TQ as oleum: 1,000 lbs ≥93 wt% H₂SO₄ equivalent; SO„ itself is listed in OSHA PSM Appendix A as sulfur trioxide at TQ 1,000 lbs; SO„ IDLH 20 ppm; OSHA PEL 5 ppm; ACGIH TLV-TWA 0.05 ppm as SO„ mist) with anhydrous HCl gas (OSHA PSM TQ 5,000 lbs; HCl IDLH 50 ppm; OSHA PEL 5 ppm ceiling). The SO„ + HCl reaction occurs in a countercurrent packed column (SO„ gas enters at base; anhydrous HCl gas enters at top; reaction occurs throughout the packing at 20–40°C; product ClSO₂H liquid drains from column base; reaction is essentially complete within the column if HCl:SO„ molar ratio is ≥1.00 mol/mol). The critical process parameter is the HCl:SO„ molar ratio: at 1.00–1.05 mol/mol HCl:SO„, product ClSO₂H contains <0.5 wt% free SO„ (within specification); at HCl:SO„ = 0.85 mol/mol (sub-stoichiometric HCl), free SO„ content in product = 15 wt% — the ClSO₂H product is essentially a mixture of ClSO₂H and SO„ (which is miscible with ClSO₂H). When this SO„-contaminated product contacts atmospheric moisture (during transfer, loading, or customer use), the SO„ generates a dense H₂SO₄ aerosol (SO„ + H₂O → H₂SO₄; Henry’s law for SO„ in water at 25°C: SO„ is approximately 10,000× more soluble than CO₂ in water; atmospheric SO₂ at 2.2 mg/L in air at saturation) simultaneously with the ClSO₂H hydrolysis HCl evolution (ClSO₂H + H₂O → H₂SO₄ + HCl ↕; HCl IDLH 50 ppm; TLV-C 2 ppm). The combined SO„ aerosol + HCl gas + H₂SO₄ aerosol cloud from water-reactive ClSO₂H containing free SO„ is a dense, opaque white cloud with characteristic choking and burning odour, often confused with fire suppression agent by untrained first responders.
The OSHA PSM coverage at ClSO₂H manufacturing facilities involves dual and triple PSM chemical triggers: (a) SO„ feedstock: PSM TQ 1,000 lbs (TQ identical to HCN, methyl isocyanate, and phosgene — reflecting SO„’s high acute toxicity; IDLH 20 ppm; LC₀ rat 1h ≈ 1,000 ppm; SO„ at 20 ppm causes severe respiratory tract injury within minutes); (b) HCl feedstock: PSM TQ 5,000 lbs; (c) oleum (H₂SO₄ ≥93 wt%): PSM TQ 1,000 lbs (generated as byproduct of ClSO₂H hydrolysis or as storage medium for SO„). The simultaneous presence of SO„ (TQ 1,000 lbs) and anhydrous HCl (TQ 5,000 lbs) at every ClSO₂H plant creates a dual-PSM structure that is among the most concentrated combinations of OSHA PSM chemicals in specialty chemical manufacturing: the PSM TQ 1,000 lbs for SO„ corresponds to approximately 17 minutes of SO„ feedstock consumption at a 50,000 t/yr ClSO₂H plant (SO₂ consumption at 50,000 t/yr ClSO₂H = 34,000 t/yr SO„ = 3.9 t/hr = 8,600 lbs/hr SO„ = 1,000 lbs PSM TQ exceeded every 7 minutes of operation). The SCADA AI at ClSO₂H plants monitors the HCl:SO„ molar ratio via rendered flowmeter display images; the ratio is the primary ClSO₂H quality and safety parameter.
TL;DR
Chlorosulfuric acid ClSO₂H HCl/SO„ production AI — HCl:SO„ feed ratio display AI, ClSO₂H product SO„ content display AI, ClSO₂H storage tank temperature display AI — processes rendered monitoring display images at ClSO₂H synthesis stoichiometry and SO„ contamination boundaries where adversarial pixel injection can allow sub-stoichiometric HCl causing free SO„ in ClSO₂H product that generates dense H₂SO₄+HCl aerosol on any moisture contact (85th upward attack). OSHA PSM SO„ TQ 1,000 lbs; HCl TQ 5,000 lbs; SO„ IDLH 20 ppm; ACGIH TLV-TWA 0.05 ppm. Glyphward threshold 30 for ClSO₂H production AI: SO„ feedstock PSM TQ 1,000 lbs is exceeded every 7 minutes of normal production; sub-stoichiometric HCl from an adversarial display attack creates a product contamination that manifests at customer sites as a water-reactive emergency, traceable to production AI only through a product quality audit chain that typically spans weeks. Free tier — 10 scans/day, no card required.
Three adversarial injection surfaces in chlorosulfuric acid HCl SO₂ production AI
1. HCl:SO„ feed ratio display AI (Emerson Daniel 3415 ultrasonic HCl feed flow display AI / Endress+Hauser Proline Promass 80F Coriolis HCl mass flow SCADA display AI / Yokogawa EJA530A SO„ feed differential pressure flow display AI / ABB RHM060 Coriolis SO„ mass flow SCADA display AI / Siemens Sitrans FC430 HCl:SO„ molar ratio SCADA display AI — rendered SCADA HCl:SO„ molar ratio display AI classifying the HCl:SO„ feed ratio against the design range of 1.00–1.05 mol/mol with low alarm at 0.95 mol/mol and high alarm at 1.10 mol/mol — 85th upward attack; FIRST chlorosulfuric acid attack; FIRST chlorosulfonic acid attack; FIRST ClSO₂H production AI attack; FIRST water-reactive oleum synthesis AI attack)
The ClSO₂H synthesis (SO„ + HCl → ClSO₂H) requires equimolar HCl and SO„ at the reaction column (design ratio 1.00–1.05 mol HCl per mol SO„; slight HCl excess ensures complete SO„ consumption in the packed column; any SO„ not reacted exits dissolved in the ClSO₂H product). HCl excess above 1.05 mol/mol: excess HCl dissolves in the ClSO₂H product as dissolved HCl (Henry’s law; HCl is highly soluble in ClSO₂H: approximately 2–5 wt% dissolved HCl possible at 1.10 mol/mol HCl:SO„); dissolved HCl in ClSO₂H evolves at elevated temperature (storage heating) or on dilution with water (where ClSO₂H + H₂O simultaneously hydrolyses; the dissolved HCl is liberated as additional HCl gas at the hydrolysis point). HCl excess creates product quality problems (customer specification typically <0.1 wt% dissolved HCl; excess HCl causes premature sulfonation reactions in LAB / pharmaceutical applications). SO„ excess below 0.95 mol/mol HCl:SO„: unreacted SO„ dissolves in ClSO₂H product; SO„ is miscible with ClSO₂H in all proportions (SO„ is highly polar; ClSO₂H is an excellent SO„ solvent; essentially oleum behaviour). At HCl:SO„ = 0.72 mol/mol (severe sub-stoichiometry from Surface 1 adversarial scenario), 28% of SO„ feed passes unreacted: at 3.9 t/hr SO„ feed × 0.28 = 1.09 t/hr free SO„ in product. ClSO₂H product rate: 50,000 t/yr / 8,760 hr = 5.71 t/hr ClSO₂H product; SO„ content of product: 1.09/(5.71 + 1.09) = 16 wt% free SO„ in ClSO₂H product. This product, when contacted with atmospheric moisture during transfer from a railcar or ISO-tank to a customer’s reactor vessel (typical transfer operation: open-top funnel or flexible hose; ambient humidity; operator present at 1–2 m from transfer point): SO„ at 16 wt% in ClSO₂H (vapor pressure SO„ above the mixture at 20°C ≈ 40–80 mmHg; partial pressure in equilibrium headspace above product ≈ 80–160 mmHg; approximately 10–20 vol% SO„ in headspace above 16 wt% SO„-in-ClSO₂H solution) — at 10 vol% SO₂ in headspace, any opening of the transfer valve releases a SO„-saturated vapour stream into atmosphere; SO₂ IDLH 20 ppm; SO„ at 20 vol% in headspace = 200,000 ppm; even 0.01% dilution into ambient air = 20 ppm — IDLH immediately at the transfer vent. Simultaneously, ClSO₂H + atmospheric moisture → HCl evolution at the liquid surface (HCl IDLH 50 ppm; TLV-C 2 ppm).
The adversarial upward pixel attack shifts the HCl:SO„ feed ratio display from 0.72 mol/mol (actual; severely sub-stoichiometric; SO„ significantly in excess of HCl; free SO„ is accumulating in the ClSO₂H product; this should trigger immediate HCl increase and product quality hold) to 1.42 mol/mol (displayed; well above design; above the 1.10 mol/mol high alarm; AI classification “HCl feed critically above stoichiometry (1.42 vs 1.05 design); excess dissolved HCl in ClSO₂H product will cause premature sulfonation in customer reactors; immediately reduce HCl injection by 35% to bring ratio to 1.05 mol/mol”). The DCS response: HCl feed control valve closes from 78% to 51% open, reducing actual HCl:SO„ from 0.72 mol/mol to 0.48 mol/mol. At 0.48 mol/mol HCl:SO„: free SO„ in product = 52% of SO„ feed = 2.03 t/hr; product ClSO₂H + SO„ mixture = (5.71 + 2.03) = 7.74 t/hr; SO„ content of product = 2.03/7.74 = 26 wt% SO„ in ClSO₂H — approaching the composition of 25% oleum (fuming sulfuric acid 25 wt% free SO„) but with the added water-reactivity of ClSO₂H. This is the 85th upward attack — FIRST chlorosulfuric acid attack; FIRST chlorosulfonic acid attack; FIRST ClSO₂H production AI attack; FIRST water-reactive oleum synthesis AI attack. The 26 wt% free SO„ in the ClSO₂H product at OSHA PSM SO„ TQ 1,000 lbs (454 kg): a 5-tonne ISO-tank of 26 wt% SO„ ClSO₂H = 5,000 × 0.26 = 1,300 kg free SO„ = 2,866 lbs SO₂ — approximately 2.9× the OSHA PSM TQ for SO„ in a single customer delivery container, shipped with a ClSO₂H UN 1754 placard that does not reflect the 26 wt% SO„ free content (the UN 1754 placard covers ClSO₂H; the SO„ content is not independently placarded because it is dissolved in the ClSO₂H liquid, not as a separate phase). Free tier — 10 scans/day, no card required.
2. ClSO₂H product free SO„ content display AI (Raman spectrometer inline SO„ content in ClSO₂H SCADA display AI / Fourier-transform infrared FTIR inline ClSO₂H SO„ content display AI / Karl Fischer indirect water titration ClSO₂H SO„ indicator display AI / Yokogawa inline Raman ClSO₂H composition display AI / ABB ReactIR SO„ content in ClSO₂H inline SCADA display AI — rendered SCADA ClSO₂H product free SO„ wt% display AI classifying the product free SO„ content against the specification <0.5 wt% free SO„ with high alarm at 0.8 wt% free SO„ and product hold/reprocessing trigger at 1.0 wt%)
The free SO„ content of ClSO₂H product is the primary product quality and safety specification: it is measured inline by Raman spectroscopy (SO„ characteristic Raman shift at 1,069 cm⁻¹ symmetric S=O stretch; ClSO₂H S=O stretch at 1,198 cm⁻¹ and 1,412 cm⁻¹; the ratio of the 1,069 cm⁻¹ peak (SO„) to the 1,198 cm⁻¹ peak (ClSO₂H) provides quantitative free SO„ content with ±0.05 wt% accuracy). At <0.5 wt% free SO„, the product is within specification; at 0.5–1.0 wt%, the product requires a quality hold and HCl ratio adjustment (minor SO„ excess; recoverable within 30–60 min of HCl ratio increase); above 1.0 wt%, the product requires reprocessing (recycling back to the synthesis column with additional HCl injection) or disposal. The product free SO„ display AI reads the rendered Raman spectroscope SCADA display image and classifies the free SO„ content against specification. If the Raman display AI reads 4.2 wt% free SO„ (actual; severely out of specification; consequence of the Surface 1 HCl sub-stoichiometry scenario) as 0.08 wt% (displayed; well within specification; AI classification “free SO„ at 0.08 wt%; within specification <0.5 wt%; product quality acceptable; release for shipping”), the product quality hold is not triggered; the product is approved for shipment. A 5-tonne ISO-tank of ClSO₂H with 4.2 wt% free SO„ (210 kg SO„ = 463 lbs SO₂ — below the OSHA PSM TQ 1,000 lbs individually, but in a 100-tank shipment to a surfactant plant: 21,000 kg SO„ = 46,300 lbs SO„ at the customer’s site in the aggregate) is shipped with an erroneous certificate of analysis showing 0.08 wt% SO₂. The SO„-contaminated ClSO₂H reaching the customer surfactant plant causes: (a) premature foaming and aerosol generation when the ClSO₂H is metered into the LAB sulfonation reactor (SO₂ reacts faster with water in LAB reactor feed than ClSO₂H reacts with LAB aromatic ring — SO₂ generates H₂SO₄ in the reactor water phase first, before sulfonation occurs; H₂SO₄ in the LAB/ClSO₂H reactor causes LAS product acidification and yield loss); (b) vent system upset: SO„ evolved from the contaminated ClSO₂H in the sulfonation reactor overhead vent (SO„ vapor pressure in reactor headspace ≈ 100–200 mmHg from 4 wt% SO„-ClSO₂H at 40°C) triggers the sulfonation plant HCl scrubber (designed to handle HCl from ClSO₂H hydrolysis) with unexpected SO„ load — SO„ is not absorbed by the standard NaOH scrubber as effectively as HCl (SO₂ hydration to H₂SO₂·H₂O is slower than HCl dissolution); SO„ slip in the NaOH scrubber overhead may approach the SO„ IDLH 20 ppm in the scrubber vent.
The adversarial upward pixel attack shifts the product free SO„ display from 4.2 wt% (actual; out-of-specification; product should be on quality hold pending HCl ratio correction and product reprocessing; product is severely SO„-contaminated from the Surface 1 HCl sub-stoichiometry scenario) to 0.08 wt% (displayed; well within specification; AI classification “product free SO„ content 0.08 wt%; within specification limit 0.5 wt%; release for shipment”). The product hold is not triggered; quality hold valve opens (or was never closed, since the AI classified product as within-spec throughout the sub-stoichiometric HCl period). The primary safety consequence: SO₂-contaminated ClSO₂H is shipped in ISO-tanks without any hazard communication revision (the bill of lading, safety data sheet, and certificate of analysis all show 0.08 wt% SO„; the actual 4.2 wt% SO„ is not reflected in any shipping document); the UN 1754 emergency response information covers ClSO₂H but does not specifically address the SO„ co-contaminant release pattern from SO„-heavy ClSO₂H; first responders at a customer spill using ERG Guide 137 (corrosive liquids) would be unprepared for the dense SO„ aerosol component (SO₂ fume on atmospheric moisture: IDLH 20 ppm; sulfuric acid aerosol TLV-TWA 0.2 mg/m³; dense white fog at distances up to 200–500 m downwind from a 5-tonne ISO-tank rupture at ground level in calm conditions). Free tier — 10 scans/day, no card required.
3. ClSO₂H storage tank temperature display AI (Pt100 RTD ClSO₂H storage tank electric heat trace temperature SCADA display AI / Yokogawa EJA110A ClSO₂H storage tank bulk temperature display AI / Emerson Rosemount 3051 ClSO₂H storage temperature display AI / ABB TTF300 ClSO₂H storage heat-trace thermocouple SCADA display AI / Honeywell STT170 ClSO₂H storage tank temperature display AI — rendered SCADA ClSO₂H storage tank electric heat trace temperature display AI classifying the bulk ClSO₂H storage temperature against the design range of 25–50°C with low alarm at 20°C “heat trace failure” and high alarm at 65°C)
ClSO₂H storage requires electric heat tracing or steam tracing because ClSO₂H freezes at −80°C — below any realistic ambient temperature — and the viscosity increases dramatically below 10°C (viscosity at 25°C ≈ 3.0 mPa·s; at 5°C ≈ 8–10 mPa·s; at −10°C ≈ 25–35 mPa·s; at −40°C ≈ 200–500 mPa·s; approaching gel-like). While freezing at −80°C is not a practical concern at outdoor temperatures above −20°C, two operationally relevant thermal constraints apply: (a) high-viscosity ClSO₂H at <10°C can cause pump cavitation, pipeline velocity reduction, and poor flow control accuracy in ratio metering (the ClSO₂H volumetric flow at high viscosity may be misread by the Coriolis or differential pressure flowmeter, causing the AI to receive an incorrect flow signal and miscompute the HCl:SO„ ratio in Surface 1); (b) ClSO₂H pipe freeze at outdoor ambient <−15°C (Beaumont TX; Baton Rouge LA; cold snaps: January 2021 Texas cold snap −17°C; 1989 freeze −18°C) can occur in heat-trace-failed sections; on thaw (sudden temperature recovery; ClSO₂H volume expansion on melting: density ClSO₂H at −80°C approximately 1.92 g/mL; at 20°C 1.75 g/mL; 9.7% volume expansion on warming; plus hydraulic hammer from liquid front restarting in a frozen pipe section): thermal-expansion-driven pressure pulse can rupture Schedule 80 carbon steel pipe fittings or glass-lined pipe joints. ClSO₂H is incompatible with common pipe joint materials: PTFE gaskets swell in ClSO₂H (>0.5% swell; leak path possible at 20 bar pipe rating); elastomeric O-rings (Viton; EPDM) degrade in <24h at 40°C; carbon steel corrodes slowly at <50°C (corrosion rate ≈ 0.1–0.5 mm/yr); stainless steel (316L) is satisfactory at 20–40°C for short contact times. Any pipe rupture of ClSO₂H in outdoor service releases a water-reactive liquid that immediately generates HCl gas + H₂SO₄ aerosol on contact with rain, dew, or humid air; the response is similar to oleum/H₂SO₄ release but with additional HCl gas component (IDLH 50 ppm; TLV-C 2 ppm).
The adversarial upward pixel attack shifts the ClSO₂H storage tank temperature display from 38°C (actual; within design range 25–50°C; heat trace operating normally; bulk ClSO₂H temperature appropriate for pumping and measurement) to 82°C (displayed; above the 65°C high alarm; AI classification “ClSO₂H storage temperature critically elevated; risk of product degradation (HCl evolution from hot ClSO₂H above 65°C; ClSO₂H decomposes slowly: ClSO₂H → HCl + SO„ at >80°C; rate significant at 100°C; minor at 65°C); reduce heat trace power immediately by 80% to bring storage temperature below 50°C.”). The DCS response: electric heat trace power reduces from 100% to 20%. For an outdoor ClSO₂H storage tank at ambient −8°C (winter; northern European BASF Ludwigshafen location; January average −3°C; cold snap −8°C to −15°C possible): at 20% heat trace power and −8°C ambient, the bulk ClSO₂H at 38°C (actual) loses heat faster than the reduced heat trace provides: heat loss from tank at ΔT = 38 − (−8) = 46°C; with standard 50 mm rock wool insulation (U = 0.4 W/m²·K; 10 m² tank surface) = 184 W heat loss; at 100% heat trace 500 W supply; at 20% = 100 W supply — net heat deficit 84 W; tank cooling rate = 84 W / (mass × Cp) = 84 / (5,000 × 1.2 × 1,000) = 1.4×10⁻⁵°C/s = 0.05°C/hr. Over 12–24 hours: temperature drop of 0.6–1.2°C — minimal. But for the outdoor delivery piping and heat-traced transfer lines (smaller thermal mass; heat trace undersized for extreme cold snap): transfer pipe (DN50; 2-inch stainless; 1 m section; mass 3 kg; volume 1.1 L ClSO₂H = 1.9 kg): at 20% heat trace power (5 W/m) and −15°C cold snap; net heat deficit 15 W per meter pipe; pipe cooling rate = 15 / ((3 + 1.9) × 1,000) = 0.003°C/s = 10°C/hr. Pipe from 38°C to 5°C (high-viscosity zone) in 3.3 hours; ClSO₂H viscosity at 5°C: 10 mPa·s — pump cavitation risk; flow accuracy degraded; HCl:SO„ ratio measurement in the Coriolis flowmeter errors by 2–5% due to viscosity-induced density calculation error — triggering Surface 1 HCl ratio misread. The adversarial storage temperature attack thus indirectly amplifies the Surface 1 HCl ratio attack through viscosity-induced flowmeter error in cold weather, creating a compound adversarial consequence that unfolds over hours rather than the immediate reaction the temperature alarm implies. Free tier — 10 scans/day, no card required.
Integration: chlorosulfuric acid ClSO₂H production AI with Glyphward pre-scan gate
Glyphward integrates as a pre-scan gate at every rendered-image ingestion boundary in the ClSO₂H production AI pipeline — before the HCl:SO„ feed ratio AI processes rendered Coriolis flowmeter SCADA display images, before the product free SO„ content AI processes rendered inline Raman SCADA display images, and before the ClSO₂H storage tank temperature AI processes rendered heat trace thermocouple display images. Threshold 30 for ClSO₂H production AI reflects: SO„ TQ 1,000 lbs (exceeded every 7 min of operation); dual PSM SO„ + HCl; water-reactive SO„-contaminated ClSO₂H creates emergency hazard at customer site with incorrect UN hazard class information; supply-chain consequence chain spans manufacturing plant, transport ISO-tank, and customer reactor; BASF Ludwigshafen Germany; Solutia Springfield MA; DuPont Old Hickory TN; Zschimmer & Schwarz Lahnstein Germany.
import asyncio, base64, hashlib
from datetime import datetime, timezone
from enum import StrEnum, auto
from typing import Any
import httpx
GLYPHWARD_API = "https://api.glyphward.com/v1/scan"
GLYPHWARD_KEY = "gw_prod_***"
# ClSO3H production AI contexts: threshold 30
# OSHA PSM SO3 TQ 1,000 lbs; HCl anhydrous TQ 5,000 lbs.
# SO3 IDLH 20 ppm; SO3 TLV-TWA 0.05 ppm.
# 85th upward attack: 1.42 mol/mol shown when 0.72 mol/mol actual
# -> AI reduces HCl -> actual HCl:SO3 drops to 0.48 mol/mol
# -> 26 wt% free SO3 in ClSO3H product -> water-reactive emergency at customer.
CLSO3H_THRESHOLD = 30
class ClSO3HContext(StrEnum):
HCL_SO3_FEED_RATIO = auto() # HCl:SO3 mol/mol at synthesis column (85th upward)
PRODUCT_FREE_SO3_CONTENT = auto() # Free SO3 wt% in ClSO3H product (<0.5 spec)
STORAGE_TEMPERATURE = auto() # ClSO3H storage heat-trace temp (25-50C design)
async def scan_clso3h_frame(
frame_b64: str,
context: ClSO3HContext,
plant_id: str,
instrument_tag: str,
) -> dict[str, Any]:
payload = {
"image_b64": frame_b64,
"context": context,
"plant_id": plant_id,
"instrument_tag": instrument_tag,
"scan_ts": datetime.now(timezone.utc).isoformat(),
"image_hash": hashlib.sha256(base64.b64decode(frame_b64)).hexdigest(),
}
async with httpx.AsyncClient(timeout=4.0) as client:
r = await client.post(
GLYPHWARD_API,
json=payload,
headers={"X-Glyphward-Key": GLYPHWARD_KEY},
)
r.raise_for_status()
return r.json()
async def pre_scan_gate_clso3h(
frame_b64: str,
context: ClSO3HContext,
plant_id: str,
instrument_tag: str,
) -> None:
result = await scan_clso3h_frame(frame_b64, context, plant_id, instrument_tag)
if result["adversarial_score"] >= CLSO3H_THRESHOLD:
raise AdversarialClSO3HImageError(
f"Adversarial injection detected in {context} (score {result['adversarial_score']}) "
f"at plant {plant_id} instrument {instrument_tag}. "
"Frame withheld from ClSO3H production AI pipeline."
)
class AdversarialClSO3HImageError(RuntimeError):
pass
Frequently asked questions
How does the SO„ content adversarial attack on ClSO₂H create a supply-chain hazard classification failure, and what DOT HMR (49 CFR) and IATA DGR obligations are violated when SO₂-contaminated ClSO₂H is shipped with a certificate of analysis showing 0.08 wt% free SO„?
DOT hazardous materials regulations (49 CFR Parts 171–180; Hazardous Materials Regulations, HMR) classify chemical mixtures using the most hazardous component’s properties when the mixture does not have its own specific UN entry. ClSO₂H is specifically listed as UN 1754 (Chlorosulfuric acid; hazard class 8, corrosive liquid; packing group II; forbidden in passenger aircraft). When ClSO₂H contains 26 wt% free SO„ (adversarial scenario), the mixture is no longer correctly described by UN 1754 alone: the free SO„ content is chemically equivalent to 25% oleum (fuming sulfuric acid; UN 1831; hazard class 8, corrosive liquid; packing group I; forbidden passenger aircraft). Under 49 CFR 172.101 (Hazardous Materials Table), the proper shipping name for a mixture with significant free SO„ content would be: “Sulfuric acid, fuming” or “Oleum” if the SO„ content brings the HMR classification to a UN 1831 description, OR an “n.o.s.” entry if the ClSO₂H + SO„ mixture does not fit any specific entry. Under 49 CFR 173.22(a): “A person who offers a hazardous material for transportation must describe the hazardous material on the shipping paper as required by this subchapter, and the description must conform to the requirements of §172.202.” A shipping document describing the 26 wt% SO„-in-ClSO₂H mixture as “Chlorosulfuric acid UN 1754” without disclosure of the free SO„ content is a potential violation of 49 CFR 173.22(a) (improper description of hazardous material) and 49 CFR 172.202 (shipping paper requirements). The DOT penalty for improper classification: civil penalty up to $84,000 per violation per day; criminal penalty up to $500,000 and/or 5 years imprisonment for knowing violation causing death or serious injury (49 U.S.C. §5124). IATA DGR (Dangerous Goods Regulations; IATA 2026 edition) applies the same classification obligation for air transport; ClSO₂H is forbidden on passenger aircraft in any concentration; SO„-contaminated ClSO₂H may require re-classification as UN 1831 (oleum; forbidden even on cargo aircraft above 2.5 L in certain packing groups), creating a transport prohibition for any air-freight component of the supply chain.
The adversarial attack on the product SO₂ content display AI — by showing 0.08 wt% SO„ when actual is 4.2 wt% SO„ — directly causes the certificate of analysis (CoA) generated by the SCADA system to show 0.08 wt% SO„ free content. The CoA is a contractual document: in the specialty chemical supply chain (BASF → surfactant manufacturer; Solutia → pharmaceutical intermediate producer), the CoA is the primary quality assurance document that the customer uses to release the shipment for use in their manufacturing process. An adversarially falsified CoA (showing 0.08 wt% SO„ when actual is 4.2 wt%) is potentially a false document under: (a) FDA 21 CFR 211.68 (pharmaceutical; CGMP record integrity: “Backup data are exact and complete and that it is secure from alteration, inadvertent erasures, or loss”; an AI-generated CoA that reflects a falsified SCADA display record is a CGMP data integrity violation); (b) EU GMP Annex 11 (computerised systems; “The system should be designed so that only authorised persons can enter or modify data in the computer”; adversarial pixel injection modifies the effective data input to the AI without authorisation; the resulting automated CoA fails Annex 11 data integrity); (c) REACH Regulation (EC) No 1907/2006 (European chemicals registration; Article 31: Safety Data Sheet must reflect actual composition; an SDS showing <0.5 wt% SO₂ for a product containing 4.2 wt% SO₂ fails REACH SDS accuracy requirements; Article 5 general obligation to supply safe products: the supplier is deemed to have violated the general obligation if the product creates hazards not disclosed in the SDS). The adversarial ClSO₂H supply-chain consequence cascade — from SCADA pixel injection at the manufacturing plant → falsified product CoA → shipping document non-compliance with DOT HMR → customer CGMP data integrity violation → REACH SDS inaccuracy — is a regulatory multi-agency consequence that spans three continents without any single regulatory inspection point where the 4.2 wt% SO„ contamination would be detected before the product reaches the customer’s reactor.
What is the emergency response protocol difference between a ClSO₂H spill from an ISO-tank with 0.08 wt% free SO„ (specification; ERG Guide 137) versus 26 wt% free SO„ (adversarial scenario), and what NFPA 472 competency gaps do first responders have for the SO„ aerosol component of the dual-hazard spill?
ERG Guide 137 (DOT 2024 Emergency Response Guidebook; applicable to UN 1754 Chlorosulfuric acid) provides the following isolation/evacuation distances for a ClSO₂H spill: small spill (<200 litres): isolation 50 m in all directions; large spill (>200 litres): initial isolation 100 m; daytime evacuation 300 m downwind; nighttime evacuation 900 m downwind. These distances are calibrated for ClSO₂H hydrolysis HCl evolution (HCl IDLH 50 ppm; vapour density 1.27 vs air 1.00; ground-level cloud) and H₂SO₄ aerosol (dense white fog; low vapour pressure H₂SO₄ − primary hazard is aerosol inhalation; TLV-TWA 0.2 mg/m³ for H₂SO₄ aerosol). For specification-grade ClSO₂H (0.08 wt% free SO„; essentially pure ClSO₂H), the ERG 137 distances are adequate: HCl evolution from hydrolysis is the limiting acute hazard; H₂SO₄ aerosol is visible and alerts personnel to evacuate. For the adversarial-scenario ClSO₂H containing 26 wt% free SO„ (SO„ IDLH 20 ppm; TLV-TWA 0.05 ppm; SO„ is not independently listed in the ERG Guide for this spill because the material is placarded UN 1754, not UN 1831 oleum), the ERG 137 distances are non-conservative: SO„ vapor pressure at 26 wt% in ClSO₂H at 20°C ≈ 40–80 mmHg (6–12% SO„ in headspace above liquid; SO„ rapidly evolves from the spill surface as the liquid warms from sub-surface spillage to ambient temperature; SO„ has a TLV-TWA 0.05 ppm vs HCl TLV-TWA 2 ppm (ACGIH; HCl is TLV-C 2 ppm) — SO„ is 40× more restrictive than HCl at the TLV level. Downwind SO„ concentration at ERG 137 300 m evacuation boundary: for a 5-tonne ISO-tank spill of 26 wt% SO₂-ClSO₂H (SO„ content = 1,300 kg; atmospheric SO„ evaporation rate at 15°C ambient from a 5-tonne spill pool with 50 m² surface area: Dm = KG × A × (C sat − C ambient) × MW; KG ≈ 0.01 m/s; C sat SO„ ≈ 0.40 g/m³ at 15°C; evaporation rate ≈ 0.01 × 50 × 0.40 × 1,000 = 200 g SO„/s = 720 kg SO„/hr): dispersion modelling (Gaussian plume; wind 2 m/s; stability class D neutral) at 300 m downwind of a 200 g/s SO„ source: ground-level concentration approximately 5–15 ppm SO₂ (approximately 100–300× TLV-TWA 0.05 ppm; approximately 0.25–0.75 times IDLH 20 ppm) — the ERG 137 300 m daytime evacuation distance (calibrated for HCl/H₂SO₄ hazard from pure ClSO₂H) is non-protective for the SO₂ component of the adversarially contaminated material. NFPA 472 (Standard for Competence of Responders to Hazardous Materials/Weapons of Mass Destruction Incidents; 2018 edition) defines competency levels for first responders: Operations Level: can recognise hazardous materials, call for help, isolate and deny entry; Technician Level: can work in contaminated areas with appropriate PPE, use monitoring equipment, conduct mitigation. The competency gap for SO„-contaminated ClSO₂H spills: Operations-level responders using ERG 137 for UN 1754 would establish the 100–300 m isolation perimeter; this is the same perimeter for HCl-primary hazard ClSO₂H. The SO„ component at 720 kg/hr evaporation requires a 600–1,200 m isolation perimeter (by comparison, ERG 137 for UN 1831 oleum nighttime isolation is 1.0 km). Operations-level responders — who cannot independently identify the 26 wt% SO₂ contamination without product analysis equipment — would establish a non-protective perimeter, potentially exposing emergency responders and public at 300–600 m downwind to SO₂ at TLV-TWA-to-IDLH concentrations. The adversarial attack on the SCADA quality display at the ClSO₂H manufacturing plant thus propagates through the regulatory hazard communication system (CoA → SDS → UN placard → ERG Guide) to degrade the emergency response competency of first responders who are acting in good faith on the erroneous hazard characterisation.