OWASP / railsgoat

A vulnerable version of Rails that follows the OWASP Top 10
railsgoat.cktricky.com
MIT License
858 stars 666 forks source link

Automate comparison of documentation and code so we can keep it sync'ed? #333

Closed jasnow closed 6 years ago

jasnow commented 6 years ago

Automate comparison of documentation and code so we can keep it sync'ed.

nvisium-john-poulin commented 6 years ago

This is a great idea, as maintaining the wiki to be accurate in respect to the current code base has proven to be one of the most challenging issues.

Off the top of my head I don’t know of a great approach for doing that. w/ RDoc it would be easiest, but then the tutorials would be in the code directly. We removed that a while back to prevent students from “cheating”

cktricky commented 6 years ago

Fwiw, the change were a result of more than a concern about cheating. Things like requiring a PR/code change every time we wanted to update a document or the overhead of maintaining multiple branch tutorials for each version, lots of requests for the tutorials to be placed somewhere more collaborative, etc. - sure there are little edge cases I'm forgetting but yeah... didn't work out so well in the code as time went on.

I would ❤️ to see any solution that meets the above feature request while preventing the introduction of regression to tutorials in the code base.

jmmastey commented 6 years ago

Is something like this worth looking into?

https://blog.github.com/2017-08-15-introducing-embedded-code-snippets/

cktricky commented 6 years ago

So possibly compare the hash of one perma-linked commit against the current embedded blob? Seems feasible but not sure if I've missed the point entirely 😄

jasnow commented 6 years ago

Pruning