SAS Viya Open-Source Security: Posit Package Manager
Establishing total SAS Viya open-source security requires a dual-layered strategy that governs both runtime code execution and incoming package software supply chains. The integration of Python and R into the SAS Viya platform represents a major step forward for enterprise...
Lachlan Simpson
Senior Platform Engineer
Lachlan helps organisations transition their analytics infrastructure into flexible, cloud-native environments without downtime or operational disruption. Combining architectural precision with a collaborative style, he guides client teams through platform deployments, licensing configurations, and environment optimisation. Lachlan’s priority is simple: build clean, scalable foundations that empower data teams to do their best work.
Establishing total SAS Viya open-source security requires a dual-layered strategy that governs both runtime code execution and incoming package software supply chains. The integration of Python and R into the SAS Viya platform represents a major step forward for enterprise analytics. By allowing data science teams to blend the distributed, in-memory power of Cloud Analytic Services (CAS) with open-source libraries across both batch and interactive SAS Compute Server sessions, organisations are driving rapid innovation. However, this flexibility demands a dual-layered security strategy. Historically, IT security teams focused on hardening the server environment where code executes. In an operational landscape where open-source packages are updated daily across public registries, securing the execution environment is no longer enough; you must also secure the underlying software supply chain.
The tension between developer agility and enterprise risk control often centres on package access. Data scientists require modern libraries to solve analytical problems, while Chief Information Security Officers must prevent unvetted, malicious code from entering core environments. The reality for executive leadership is clear: if your execution host is hardened but your open-source supply chain remains open to public repositories, your platform remains vulnerable to typosquatting, dependency confusion, and automated injection attacks. This discrepancy creates an enterprise “Governance Gap.” To bridge it, platform architects must distinguish between execution controls, which govern runtime activity, and supply-chain controls, which govern incoming package assets.
Modern SAS Viya Open-Source Security: Execution vs. Supply Chain Governance
A hardened analytics environment requires two distinct domains of governance to operate safely at scale. Treating the act of running code and the act of acquiring code as the same risk vector leads to structural vulnerabilities.
Execution Governance focuses on the runtime environment, ensuring that once an analytical process starts—whether inside an interactive user session, a scheduled batch processing script, or a distributed CAS action—it operates within strictly defined system parameters. Supply-Chain Governance acts as the upstream firewall, controlling exactly which packages, dependencies, and version builds are permitted to enter the corporate environment in the first place.
Governance Category
Execution Governance
Supply-Chain Governance
Primary Goal
Control process actions and file access at runtime.
Control code binaries and libraries before entering the environment.
Control Mechanism
Declarative policy files (extlang.xml), LOCKDOWN mode, and SAS Watchdog.
Curated repositories, OSV vulnerability scanning, and license filtering via Posit Package Manager.
Target Workloads
SAS Compute Server (batch & interactive) and CAS nodes.
Centralised sas-pyconfig build engine and persistent volume mounts.
Threat Vector
Arbitrary code execution, privilege escalation, and unapproved file system reads.
Typosquatting, dependency confusion, malicious code injection, and known vulnerabilities (CVEs).
While SAS Viya provides thorough execution governance, complete posture protection requires a specialised partner solution like Posit Package Manager (PPM) integrated alongside Selerity’s managed platform hosting to govern the upstream supply chain.
Comparison matrix highlighting key differences between runtime execution controls and upstream supply-chain governance.
Pillar I: Hardening Execution Governance within SAS Viya
The SAS Viya runtime security model uses Kubernetes-native configurations to establish a least-privilege baseline. This ensures that open-source code execution cannot breach the integrity of the broader platform.
The technical foundation for governing external languages in CAS is the extlang.xml configuration file. This declarative control point allows administrators to define explicit boundaries for Python and R processes. Key parameters include:
Restricting Binary Paths and Scratch Disks: Administrators can hardcode approved execution paths (typically under /opt/sas/viya/home/sas-pyconfig/) and define isolated scratchDisk locations, preventing external scripts from writing to or reading from sensitive system directories.
Preventing Arbitrary Environment Code: Setting userSetEnv="BLOCK" and userInlineCode="BLOCK" prevents users from injecting unapproved environment variables or executing ad hoc code strings that bypass corporate auditing.
Host Identity Sessions: Requiring users to map through the CASHostAccountRequired custom group enforces host-level file permissions. Note: This group ID is strictly case-sensitive; mismatched casing causes immediate authentication failure.
To protect SAS Compute Server workloads—covering both background batch processing jobs and interactive SAS Studio user sessions—SAS Viya employs LOCKDOWN mode and the SAS Watchdog process. SAS Watchdog monitors spawned Python and R processes to enforce LOCKDOWN path restrictions, preventing unauthorised file system traversal.
However, system architects must note a key structural boundary: LOCKDOWN mode and SAS Watchdog specifically protect the SAS Compute Server. They do not restrict Python execution within SAS Visual Forecasting (TSMODEL), the SAS Micro Analytic Service (MAS), or raw CAS worker nodes. Security across the entire footprint requires unified upstream controls.
From a DevSecOps operational perspective, the CAS controller mounts the storage volume containing open-source runtimes as read-only. To update extlang.xml or deploy new runtime configurations, an administrator must launch a dedicated utility pod that mounts the sas-pyconfig Persistent Volume Claim (PVC) in read-write mode to apply configuration changes safely.
The Supply-Chain Security Gap
A significant vulnerability exists when an analytics platform automates open-source runtime builds without an upstream gatekeeper. In SAS Viya, the SAS Configurator for Open Source (sas-pyconfig job) automates the installation of Python and R environments. It uses a change-configuration.yaml manifest and verifies md5sum hashes to ensure build consistency across cluster nodes.
However, build consistency is not the same as software security. The sas-pyconfig job fetches packages directly from public mirrors such as PyPI or CRAN. Without an upstream security filter, an automated sas-pyconfig build job will successfully compile a consistent, functional environment that contains compromised packages introduced through typosquatting or dependency confusion attacks. If a public repository hosts a malicious package version, your automated installation engine becomes the delivery mechanism for that breach across all batch Compute jobs and CAS sessions.
Pillar II: Securing the Supply Chain with Posit Package Manager
Posit Package Manager acts as a proactive firewall between public package repositories and the SAS Viya environment. It ensures that only vetted, compliant, and scanned packages are made available to the sas-pyconfig build engine.
Because sas-pyconfig installs Python and R packages into a shared, persistent volume (sas-pyconfig PVC) accessed by both SAS Compute Server pods (for batch scripts and interactive sessions) and CAS nodes, placing PPM upstream secures the entire SAS Viya platform.
Architectural blueprint illustrating governed open-source package flow from Posit Package Manager to SAS Compute pods and CAS nodes.
Four Critical Supply-Chain Controls Provided by PPM:
Automated Vulnerability Management: PPM continuously checks PyPI, CRAN, and Bioconductor packages against the Open Source Vulnerability (OSV) database. System administrators can automatically block packages containing known CVEs from being served to the sas-pyconfig engine.
Curated Package Repositories: Using curated-cran and curated-pypi sources, IT teams restrict the environment to an approved subset of vetted libraries. This eliminates the operational exposure of unmonitored public mirrors.
License Compliance Enforcement: PPM parses package metadata to block libraries with non-compliant or legally risky software licenses (such as GPL-3), mitigating corporate legal risk before code reaches developer workstations or production batch pipelines.
Precompiled Manylinux Binaries: PPM provides precompiled Manylinux binaries, removing the need to compile complex C/C++ dependencies during sas-pyconfig execution. This transforms build processes that previously took hours into reliable installations completed in minutes, eliminating build failures caused by missing OS-level header files.
Air-Gapped and Isolated Network Deployments
For high-security enterprise environments across Government, Defence, Healthcare, and Financial Services, direct internet access is restricted or prohibited. Maintaining open-source analytics inside an isolated network is simplified using the rspm-offline-downloader utility.
This utility allows administrators in a connected staging zone to download daily package updates, metadata mirrors, and OSV security definitions. Transferring these assets via secure media into the air-gapped network ensures that offline SAS Compute Server pods and CAS nodes maintain an up-to-date security posture, benefiting from identical vulnerability filtering and license enforcement as online deployments.
Diagram illustrating air-gapped SAS Viya open-source security synchronisation using rspm-offline-downloader.
Defence-in-Depth Architecture for Modern Analytics
Achieving enterprise-grade open-source analytics requires a complete defence-in-depth architecture. SAS Viya and Posit Package Manager operate together to secure the entire analytical lifecycle—from the moment an open-source package is mirrored from PyPI or CRAN, through the sas-pyconfig build process, to the exact millisecond code executes inside a production batch pipeline or distributed CAS session.
For IT, Analytics, and Security leaders, the mandate is clear: securing the runtime environment is only half the requirement. Selerity invites technical leaders to audit their current open-source package supply chains. By deploying this dual-governance architecture, you empower your data science teams with the flexibility of open source while maintaining complete operational, security, and legal integrity.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.