News for hackers. Stuff that matters.
Re:Ask HN: Can Jasmine Unit Tests Expose Security Vulnerabil... by adambd on Wednesday February 12, 2014 @05:59PM (#7228001)
If I understand correctly what your question is, it shouldn't be a problem. Since your JavaScript - which you are testing - is publicly accessible, the tests shouldn't do any harm. They cannot do anythin, what the users couldn't do anyways.

What can be a problem: if you produce sample data during running the tests, you are going to produce a lot of trash data in your production environment. But you shouldn't do it anyway - just mock AJAX calls and so on.

Re:Ask HN: Can Jasmine Unit Tests Expose Security Vulnerabil... by jbrowne on Wednesday February 12, 2014 @06:19PM (#7228141)
Thanks for responding - that's my understanding too. Though if there's something I'm not aware of, I'd love to know!

Thanks for raising the trash data issue. The framework does a pretty good job of set up and tear down before and after each test is run, so I'm not too concerned about the trash data as it's destroyed once the test has completed. (If I'm understanding your point correctly?)

Re:Ask HN: Can Jasmine Unit Tests Expose Security Vulnerabil... by adambd on Wednesday February 12, 2014 @06:49PM (#7228334)
I mean something like you call a REST API where you create fake data which is then visible on the production site. To avoid this, you should mock AJAX calls.
Re:Ask HN: Can Jasmine Unit Tests Expose Security Vulnerabil... by jbrowne on Wednesday February 12, 2014 @06:52PM (#7228350)
Got it - thanks!