Protip: while in a Swift playground, for the love of God don't write system("cd ~; rm -rf *"). Runs-as-you-type has its downsides! — Steve T-S (@stroughtonsmith) June 4, 2014

Apple’s new Playgrounds feature is very cool, allowing developers to test Apple’s new programming language Swift in real time, but developer Steve Stroughton-Smith points out a rather gaping flaw.

It turns out that the app isn’t sandboxed which means entered code can do pretty much anything it wants. So, entering the code above for instance will actually delete every file on your system. The realtime nature of Playgrounds means you don’t even have to press Enter for the entire contents of your hard drive to be erased.

Until Apple fixes this issue, people should be very careful clicking on Swift scripts that they do not understand as the Playground will run them, malicious or not.

Be careful clicking on playground links you come across on the web: it looks like they can do serious damage: http://t.co/XdENMf743o — Craig Hockenberry (@chockenberry) June 4, 2014

FTC: We use income earning auto affiliate links. More.

Check out 9to5Mac on YouTube for more Apple news: