View install-dependency-track.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker pull owasp/dependency-track | |
docker volume create --name dependency-track | |
docker run -d -p 8080:8080 –name dependency-track -v dependency-track:/data owasp/dependency-track |
View retrieves-next-showings.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: As a cinephile In order to never miss a minute of a movie I want to know what are the next showings of the movie theater | |
Background: | |
Given a cinephile | |
Scenario: Looking for the next showings before the start of the last one | |
Given the last showing is not started yet | |
When the user asks for the next showings | |
Then the returned showings are not started yet | |
And the returned showings are not starting in the next 15 minutes |
View RetrieveShowingsStepDefs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StepDefs implements En { | |
public StepDefs() { | |
Given("^a cinephile$", () -> me = new Cinephile("me")); | |
Given("^the last showing is not started yet$", | |
() -> lastShowing = new Showing(now().plusHours(3))); | |
When("^the user asks for the next showings$", | |
() -> nextShowings = searchShowings.searchNextShowingsFor(me)); |
View table-bad-pattern.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given the showing: | |
| name | schedule | director | rating | duration | | |
| Gore Movie | 21H00 | Jhon Doe | NC-17 | PT2H5M | | |
When a child tries to buy a ticket for this showing | |
Then the purchase is forbidden |
View ForbiddenPurchase.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given a NC-17 rated showing | |
When a child tries to buy a ticket for this showing | |
Then the purchase is forbidden |
View karate-profile.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Profile endpoint | |
Scenario: creating a profile | |
Given path 'profiles' | |
And request | |
""" | |
{ "topics": [{"name": "DDD"},{"name": "Hexagonal Architecture"}],"talksFormats": ["QUICKIE","CONFERENCE"] } | |
""" | |
When method post | |
Then assert responseStatus == 201 |
View RawSQLAuthenticationProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jdbcTemplate | |
.queryForObject( | |
"Select * from users where username='" + name + "' and password='" + password + "'", | |
BeanPropertyRowMapper.newInstance(DBUser.class)); |
View sqlInjection.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Select * from users where username='' OR '1'='1' LIMIT 1 --' and password='' |
View BoilerplateConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class DomainConfiguration { | |
@Bean | |
public RetrieveSanitaryGrades retrieveSanitaryGrades() { | |
return new RetrieveSanitaryGrades(); | |
} | |
@Bean | |
public SearchRestaurants restaurantsFinder(Restaurants restaurants, |
View domainannotations.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.annotation.Inherited | |
@Retention(AnnotationRetention.RUNTIME) | |
@Target(AnnotationTarget.CLASS) | |
@Inherited | |
annotation class DomainService | |
@Retention(AnnotationRetention.RUNTIME) | |
@Target(AnnotationTarget.CLASS) | |
@Inherited |
OlderNewer