Files
speckle-automate-data-shield/README.md
T
Jonathon Broughton 002dd3de50 Add developer guide and enhance user instructions
- Introduced a comprehensive developer guide for the Data Shield function.
- Detailed deployment workflows, including release creation and dependency management.
- Explained core components like parameter matching, traversal systems, and actions.
- Updated user guide with sanitization modes and usage instructions.
- Added troubleshooting tips for common issues.
2025-03-25 01:00:12 +00:00

4.0 KiB
Raw Blame History

🛡️ Data Shield — User Guide

Data Shield is a Speckle Automate function that helps you keep your model data clean, safe, and share-ready. Whether you're sending models to clients, collaborators, or just tidying up before archiving — Data Shields got your back.


What Data Shield Does

Data Shield scans your Speckle model for parameters youd rather not share and takes care of them for you. It creates a fresh, sanitized version of your model while keeping the original intact.

Why youll love it:

  • Privacy Protection — Say goodbye to accidentally sharing sensitive data.
  • Data Compliance — Stay on the right side of data protection policies.
  • Confident Collaboration — Share models without oversharing.

Sanitization Modes

We know one size doesnt fit all, so Data Shield offers three modes to suit your style:

Prefix Matching

Best for: Simple, predictable naming conventions.

Remove parameters that start with a specific prefix.

Example: Want to remove everything starting with secret_? Just set that prefix and Data Shield does the rest.

Setup:

  • Add your prefix (like internal_, private_, or secret_)
  • Toggle strict mode for case sensitivity (on or off — your call)

Pattern Matching

Best for: Wildcards, regex fans, and complex patterns.

Get fancy and use *, ?, or full regular expressions.

Examples:

  • client_* matches anything that starts with client_
  • ?_internal matches a_internal, b_internal
  • /^(secret|private)_.*$/i matches parameters starting with secret_ or private_, ignoring case

Anonymization

Best for: Keeping the structure, hiding the details.

Automatically detect email addresses inside parameter values and anonymize them.

Example: john.doe@example.com becomes j***@example.com

No setup needed. Just select and go.


How to Use Data Shield

  1. Set up your automation:

    • In your Speckle project, head to Automations
    • Click Add Automation and choose Data Shield
    • Set your trigger (like “on new commit”)
  2. Configure your mode:

    • Choose Prefix, Pattern, or Anonymization
    • Add your prefix or pattern if needed
    • Toggle strict mode if you want case sensitivity
  3. Run it:

    • Itll run automatically when triggered — or you can manually run on specific commits
  4. Check results:

    • Sanitized models show up under the processed/ branch
    • Youll get a run report showing what got cleaned
    • Highlighted changes can be seen directly in the viewer

::: 💡 Tips & Tricks

  • Test first! — Run it on a small test model before going full production.
  • Start simple. Use prefix matching for clear conventions, pattern matching for complexity, or anonymization for safe sharing.
  • Regex pro tip:
    • Wrap your regex in /
    • Add i for case-insensitive matching
    • Use ^ (start) and $ (end) for tighter control :::

📚 Example Workflows

→ Prepping for external sharing

  • Use pattern matching with /^(internal|private|confidential)_.*$/i
  • Run before sending out models
  • Share confidently!

→ Anonymizing client data

  • Select Anonymization mode
  • Run on any models with contact details
  • Use sanitized versions for demos, public decks, or sales pitches

→ Stripping out project-specific baggage

  • Prefix matching with something like projectX_
  • Clean your models before turning them into templates

🛠️ Troubleshooting

  • Not matching anything? Double-check your pattern or prefix.
  • Case mismatch? Try turning off strict mode.
  • Only partly sanitized? Some complex models might need multiple passes.
  • Errors? Check run logs in the automation report for clues.

🤔 Still stuck?

No worries — weve got your back.
👉 Post your questions in the Speckle Community Forum and someone from the team (or one of our awesome community members) will help you out!