CAISP · Domain 4 of 5 · 20% of the exam

CAISP Domain 4: AI Supply Chain and Pipeline Security

40 free practice questions for AI Supply Chain and Pipeline Security in the Certified AI Security Professional exam. Try each question first, then open "Show answer" for the correct option and explanation.

AI Supply Chain and Pipeline Security practice questions

  1. Question 1. Why is loading an untrusted model file saved with Python's pickle format dangerous?

    1. Pickle files always contain hidden training data
    2. Deserializing it can execute arbitrary code
    3. Pickle files are too large to scan for malware
    4. Pickle files can't store neural network weights
    Show answer

    Answer: B. Deserializing it can execute arbitrary code

    Pickle can run code during loading, so malicious model files can compromise the host. Formats like safetensors store only tensors and avoid this.

  2. Question 2. Which model file format was designed to store tensors safely without the code execution risk of pickle?

    1. Jupyter notebook files
    2. ONNX with custom operators
    3. Python pickle with compression
    4. safetensors
    Show answer

    Answer: D. safetensors

    safetensors stores raw tensors and metadata only, making loading safe and fast. It's widely used on model hubs.

  3. Question 3. What is the purpose of an ML or AI bill of materials (MLBOM/AIBOM)?

    1. To document the model's marketing claims
    2. To track the cloud costs of training runs
    3. To inventory models, datasets, and dependencies used by an AI system
    4. To list the employees who worked on a model
    Show answer

    Answer: C. To inventory models, datasets, and dependencies used by an AI system

    Like an SBOM, an AI BOM records components (base models, datasets, libraries, versions) so organizations can assess provenance and respond to vulnerabilities.

  4. Question 4. Which control helps verify that a model downloaded for deployment is the exact artifact its publisher released?

    1. Reading the model card's description
    2. Checking that the model has many downloads
    3. Verifying a cryptographic signature on the model
    4. Running the model once on sample input
    Show answer

    Answer: C. Verifying a cryptographic signature on the model

    Model signing and attestation prove integrity and origin, protecting against tampered or swapped artifacts.

  5. Question 5. What does the SLSA framework help organizations achieve?

    1. Compliance with the EU AI Act's transparency rules
    2. Faster inference on consumer GPUs
    3. Automatic labeling of training data
    4. Verifiable build provenance and integrity of software artifacts
    Show answer

    Answer: D. Verifiable build provenance and integrity of software artifacts

    SLSA (Supply-chain Levels for Software Artifacts) defines levels of build integrity and provenance, which apply to ML pipelines and model artifacts too.

  6. Question 6. An attacker publishes a malicious package named like a popular ML library, hoping developers mistype it. What is this?

    1. Prompt leaking
    2. Typosquatting
    3. Evasion
    4. Model inversion
    Show answer

    Answer: B. Typosquatting

    Typosquatting and dependency confusion target package ecosystems. Pinned dependencies, private registries, and SCA scanning reduce the risk.

  7. Question 7. Which threat modeling approach can be applied to an AI system by examining spoofing, tampering, repudiation, information disclosure, denial of service, and elevation of privilege?

    1. DREAD
    2. STRIDE
    3. PASTA's risk scoring only
    4. CVSS
    Show answer

    Answer: B. STRIDE

    STRIDE works well on AI data flow diagrams, for example tampering with training data, information disclosure through outputs, or elevation of privilege via agent tools.

  8. Question 8. In a poisoned pipeline execution (PPE) attack against an ML CI/CD pipeline, what does the attacker do?

    1. Floods the inference API with requests
    2. Modifies pipeline configuration or scripts to run malicious code
    3. Extracts the model by querying it repeatedly
    4. Sends adversarial images to the deployed model
    Show answer

    Answer: B. Modifies pipeline configuration or scripts to run malicious code

    PPE abuses CI/CD by altering pipeline definitions or scripts (often via pull requests) to steal secrets or tamper with artifacts. Protect branches and isolate pipeline secrets.

  9. Question 9. Which pipeline checks are MOST relevant for securing the code of an AI application before deployment?

    1. Only checking the model's accuracy metrics
    2. Only manual code review at release time
    3. Only load testing of the inference endpoint
    4. SAST, SCA, and secret scanning
    Show answer

    Answer: D. SAST, SCA, and secret scanning

    AI apps are software. Static analysis, dependency scanning, and secret detection catch common vulnerabilities early.

  10. Question 10. A team wants to use an open-weight model from a public hub. Which set of checks BEST reduces supply chain risk?

    1. Pick the model with the most stars and deploy it directly
    2. Rely on the hub's popularity ranking as a security review
    3. Verify publisher and signature, scan files, prefer safe formats, and record it in an AI BOM
    4. Fine-tune it immediately so any malicious code is overwritten
    Show answer

    Answer: C. Verify publisher and signature, scan files, prefer safe formats, and record it in an AI BOM

    Provenance, integrity checks, file scanning, safe serialization formats, and inventory give defense in depth for third-party models.

  11. Question 11. Why should training data sources be tracked with provenance records?

    1. To avoid having to document the model
    2. To detect tampering and trace poisoned data back to its source
    3. To reduce the number of GPUs needed for training
    4. To make the model's outputs more creative
    Show answer

    Answer: B. To detect tampering and trace poisoned data back to its source

    Knowing where data came from and how it changed supports integrity checks, poisoning investigations, and compliance obligations.

  12. Question 12. Where should API keys for calling an LLM provider be stored in an AI application?

    1. In the system prompt so the model can use them
    2. In client-side JavaScript for simplicity
    3. In the model card published with the app
    4. In a secrets manager accessed by backend code
    Show answer

    Answer: D. In a secrets manager accessed by backend code

    Keys should never be exposed to clients or the model. Backend services retrieve them from a secrets manager and rotate them regularly.

  13. Question 13. What is Sigstore (with tools like cosign) commonly used for in AI supply chains?

    1. Encrypting GPU memory during model training runs
    2. Hosting large language models for public inference
    3. Training models only on digitally signed datasets
    4. Signing and verifying artifacts such as containers and models
    Show answer

    Answer: D. Signing and verifying artifacts such as containers and models

    Sigstore provides keyless signing and transparency logs, helping verify who produced an artifact.

  14. Question 14. What does an in-toto attestation provide?

    1. Verifiable metadata about how an artifact was produced
    2. A performance benchmark for a model
    3. A backup of model weights
    4. A license to use a pretrained model
    Show answer

    Answer: A. Verifiable metadata about how an artifact was produced

    Attestations record build steps and inputs so consumers can verify provenance and integrity.

  15. Question 15. Why should ML CI/CD pipelines use short-lived, federated credentials (e.g., OIDC) instead of long-lived keys?

    1. Long-lived keys are faster to use
    2. Short-lived credentials make models more accurate
    3. Stolen short-lived credentials expire quickly, limiting abuse
    4. Federated credentials remove the need for access control
    Show answer

    Answer: C. Stolen short-lived credentials expire quickly, limiting abuse

    Workload identity federation avoids storing static secrets in pipelines.

  16. Question 16. What is the risk of an internet-exposed Jupyter notebook server without authentication?

    1. Charts and graphs in the notebook will render incorrectly
    2. The model's accuracy on test data will decrease
    3. Attackers can run code and access data and credentials
    4. The notebook kernel will run noticeably more slowly
    Show answer

    Answer: C. Attackers can run code and access data and credentials

    Notebooks provide code execution. Exposed instances are frequently hijacked for data theft or cryptomining.

  17. Question 17. Why is dataset versioning important for AI security?

    1. It reduces the storage size of large training datasets
    2. It enables tracing and rollback if data proves poisoned
    3. It removes the need to validate training data
    4. It speeds up inference for models in production
    Show answer

    Answer: B. It enables tracing and rollback if data proves poisoned

    Versioned, hashed datasets let teams reproduce models and identify which versions were affected by poisoning.

  18. Question 18. What is the purpose of pinning exact dependency versions and hashes in ML projects?

    1. Reduce the number of Python files
    2. Make the model run on older GPUs
    3. Prevent unexpected or malicious package updates from being installed
    4. Allow any version to be installed automatically
    Show answer

    Answer: C. Prevent unexpected or malicious package updates from being installed

    Pinning with hash checking prevents dependency confusion and malicious version bumps.

  19. Question 19. When loading PyTorch checkpoints from untrusted sources, which practice reduces code execution risk?

    1. Load weights only (e.g., weights_only mode) or use safetensors
    2. Load the full pickle object for convenience
    3. Run the loader as an administrator
    4. Disable antivirus before loading
    Show answer

    Answer: A. Load weights only (e.g., weights_only mode) or use safetensors

    Restricting deserialization to tensors avoids executing arbitrary pickled code.

  20. Question 20. Why should AI training jobs run with least-privilege identities?

    1. Training runs faster with fewer permissions
    2. A compromised job then can't access unrelated data or systems
    3. It removes the need for logging
    4. Least privilege improves model accuracy
    Show answer

    Answer: B. A compromised job then can't access unrelated data or systems

    Training environments often touch sensitive data. Scoped permissions limit what an attacker can reach.

  21. Question 21. What is the purpose of evaluation gates in an ML deployment pipeline?

    1. Encrypt models before deployment
    2. Assign models to GPUs automatically
    3. Speed up deployment by skipping tests
    4. Block models that fail security, safety, or quality tests
    Show answer

    Answer: D. Block models that fail security, safety, or quality tests

    Automated gates for red-team tests, bias checks, and performance thresholds prevent risky models from reaching production.

  22. Question 22. Why should container images used for model serving be scanned?

    1. It's required to use GPUs
    2. Scanning improves model accuracy
    3. Scanning makes containers start faster
    4. They may include vulnerable OS packages or libraries
    Show answer

    Answer: D. They may include vulnerable OS packages or libraries

    Serving images inherit vulnerabilities from base layers and dependencies.

  23. Question 23. Which information is MOST important to include in an AI bill of materials for a deployed model?

    1. Base model, datasets, library versions, and their sources
    2. The model's marketing tagline and product positioning
    3. The office location where the model was trained
    4. The names of each developer who worked on the model
    Show answer

    Answer: A. Base model, datasets, library versions, and their sources

    Component and provenance details support vulnerability response, licensing, and compliance.

  24. Question 24. What is a model card's security value in the supply chain?

    1. It documents intended use, limits, and data sources for review
    2. It cryptographically signs the model to prove its origin
    3. It replaces the need for security and safety testing
    4. It encrypts the model's weights for secure distribution
    Show answer

    Answer: A. It documents intended use, limits, and data sources for review

    Model cards inform users of risks and appropriate uses, supporting informed adoption decisions.

  25. Question 25. What does SLSA provenance help consumers verify?

    1. Who purchased the artifact
    2. Which source and build process produced an artifact
    3. How much the artifact cost to produce
    4. Whether the model is accurate enough
    Show answer

    Answer: B. Which source and build process produced an artifact

    Provenance ties artifacts to their source repositories and builders, making tampering detectable.

  26. Question 26. A team downloads a popular dataset from a mirror site rather than the original source. What is the BEST control?

    1. Train immediately and check accuracy later
    2. Rename the files to prevent tampering
    3. Verify published checksums or signatures against the original source
    4. Trust the mirror because the dataset is popular
    Show answer

    Answer: C. Verify published checksums or signatures against the original source

    Integrity verification against authoritative hashes detects modified or poisoned copies.

  27. Question 27. Where should an AI firewall or guardrail service be placed in an LLM application architecture?

    1. Only inside each end user's web browser
    2. Embedded in the GPU hardware firmware
    3. Between the application and the model, on inputs and outputs
    4. Inside the training dataset storage bucket
    Show answer

    Answer: C. Between the application and the model, on inputs and outputs

    Inline placement allows inspection and policy enforcement on both prompts and responses.

  28. Question 28. Why should secrets scanning be applied to ML notebooks and repositories?

    1. It removes the need for code review
    2. Scanning improves notebook performance
    3. Notebooks often contain hard-coded API keys and credentials
    4. Secrets can't exist in notebooks
    Show answer

    Answer: C. Notebooks often contain hard-coded API keys and credentials

    Experimentation code frequently embeds tokens for data sources and model APIs.

  29. Question 29. What is dependency confusion?

    1. Two developers editing the same file at the same time
    2. A public package with an internal package's name gets installed
    3. A classifier confusing two visually similar classes
    4. A package manager crashing midway through an install
    Show answer

    Answer: B. A public package with an internal package's name gets installed

    Build tools may prefer higher-versioned public packages. Scoped registries and pinning prevent this.

  30. Question 30. What is the purpose of access control on a model registry?

    1. Only approved people and pipelines can publish or change models
    2. Model downloads from the registry complete faster
    3. Registered models achieve higher accuracy on benchmarks
    4. Models use less GPU memory when loaded from the registry
    Show answer

    Answer: A. Only approved people and pipelines can publish or change models

    Unauthorized changes to registered models could introduce backdoors into production.

  31. Question 31. Why should GPU clusters used for training be network-isolated?

    1. Isolated clusters no longer need security patching
    2. They hold valuable data and models, making them prime targets
    3. GPUs are technically unable to reach the internet
    4. Network isolation increases GPU clock speeds
    Show answer

    Answer: B. They hold valuable data and models, making them prime targets

    Segmentation limits exposure of expensive, data-rich infrastructure.

  32. Question 32. A threat model for an LLM app identifies 'tampering with the vector store'. Which STRIDE category is this, and what control fits?

    1. Tampering; restrict write access and verify integrity
    2. Spoofing; rename the model to something generic
    3. Denial of service; add more GPUs to the cluster
    4. Repudiation; add more logging and nothing else
    Show answer

    Answer: A. Tampering; restrict write access and verify integrity

    Tampering threatens integrity. Write controls, change review, and integrity monitoring address it.

  33. Question 33. What is the benefit of reproducible training builds?

    1. They allow verification that a model was built from declared inputs
    2. They make each model unique and unpredictable
    3. They prevent all inference attacks
    4. They reduce training costs to zero
    Show answer

    Answer: A. They allow verification that a model was built from declared inputs

    Reproducibility supports audits and detection of tampering in training pipelines.

  34. Question 34. Which is the MOST important control when fine-tuning on data collected from users?

    1. Fine-tune on production traffic in real time
    2. Validate, filter, and review the data to prevent poisoning and privacy issues
    3. Use all collected data without review for maximum coverage
    4. Delete the base model after fine-tuning
    Show answer

    Answer: B. Validate, filter, and review the data to prevent poisoning and privacy issues

    User-contributed data can be malicious or sensitive. Curation reduces both risks.

  35. Question 35. What is an SBOM's main limitation for AI systems compared to an AI BOM?

    1. It is only used to inventory physical hardware
    2. It encrypts the components it lists by default
    3. It may not capture models, datasets, and training lineage
    4. It can't list the software libraries in use
    Show answer

    Answer: C. It may not capture models, datasets, and training lineage

    AI BOMs extend SBOM concepts to AI-specific components such as models and data.

  36. Question 36. Why should third-party AI APIs be assessed like other vendors?

    1. They're guaranteed to never experience outages
    2. They process your data and affect security and compliance
    3. They never store any of the data sent to them
    4. They're exempt from contracts and legal obligations
    Show answer

    Answer: B. They process your data and affect security and compliance

    Vendor due diligence covers data handling, retention, training use, security controls, and availability.

  37. Question 37. What should be verified about an external AI provider's data usage terms?

    1. Only the provider's office locations and headcount
    2. Whether your prompts and outputs are used to train their models
    3. The number of employees in the provider's sales team
    4. The color scheme and design of the provider's logo
    Show answer

    Answer: B. Whether your prompts and outputs are used to train their models

    Many organizations require that their data not be used for provider training, which must be contractually confirmed.

  38. Question 38. What is the purpose of canary tokens in AI training data or documents?

    1. Compress datasets to reduce storage costs
    2. Detect whether data is leaked or used without permission
    3. Improve retrieval accuracy for RAG applications
    4. Speed up training convergence on large datasets
    Show answer

    Answer: B. Detect whether data is leaked or used without permission

    Unique markers appearing elsewhere reveal leakage or unauthorized reuse.

  39. Question 39. Why should AI application deployments include rollback plans?

    1. To avoid testing new models before release
    2. To revert quickly if a model behaves unsafely
    3. To reduce the storage needed for model versions
    4. To increase how often new models are deployed
    Show answer

    Answer: B. To revert quickly if a model behaves unsafely

    Fast rollback limits the impact of problematic model releases.

  40. Question 40. An organization wants assurance that a vendor's model wasn't trained on its confidential data leaked elsewhere. Which approach is MOST practical?

    1. Assuming reputable vendors never use leaked data for training
    2. Retraining the vendor's entire model internally from scratch
    3. Contractual provenance commitments plus testing for memorized canaries
    4. Asking the model directly whether it has seen the data before
    Show answer

    Answer: C. Contractual provenance commitments plus testing for memorized canaries

    Contracts establish obligations, and canary testing can provide some evidence. Models' self-reports aren't reliable.

CAISP is a certification offered by Practical DevSecOps. These questions are original study material, not questions from the real exam.