Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Intelligence View
⚡ tsecurity.de Intelligence

Sanboxed Claude Code

In case anyone cares about it, you can run Claude inside a container if you want to make sure to only give it the context of the codebase on which you're currently working, not your whole OS. This isn't news, nothing that I'll post here…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

In case anyone cares about it, you can run Claude inside a container if you want to make sure to only give it the context of the codebase on which you're currently working, not your whole OS.



This isn't news, nothing that I'll post here is gonna be blowing anyone's mind, I simply want to share my take on specific topics.





  1. Create your own sandbox image. Dockerfile shown here for reference, but can be whatever suits you as long as it has npm for installing Claude:


    FROM node:24-alpine

    # Create a non-root user to run the code
    RUN adduser -D claude

    # Install Node.js and npm (as root)
    RUN apk update && \
    apk add nodejs npm && \
    rm -rf /var/cache/apk/*

    # Install claude-code globally (as root)
    RUN npm install -g @anthropic-ai/claude-code

    # Set the working directory
    WORKDIR /workspace

    # Give the non-root user ownership of the workspace directory
    RUN chown -R claude:claude /workspace

    # Switch to the non-root user
    USER claude

    # Default command to run when the container starts
    CMD ["sh"]




  2. Run an ephemeral container that has access to your current workdir:


    docker run -it --rm -v $(pwd):/workspace:rw claude-sandbox



    In here, /workspace matches what you define as WORKDIR in the Dockerfile.




  3. (Optional) Create an alias by adding this to your .bashrc or .zshrc:


    alias claude-sandbox='docker run -it --rm -v $(pwd):/workspace:rw claude-sandbox'





That's it. You're not gonna have to worry about AI going rogue and messing up your whole system just because you got too deep into "vibe coding" and told Claude to do anything it wanted as long as your weekend project ended up working fine.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Sanboxed Claude Code

Thematisch verwandte Begriffe: Sanboxed, Claude, Code · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY Kritische Sicherheitsmeldung
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick