How ragavendira1/aidevsecopsdemo works
Project type and purpose
• This is a full-stack Java Spring Boot web application (“Java Coffee Shop”) with an embedded Thymeleaf frontend, intentional vulnerabilities for training, and export/import features. It also includes build/deploy scripts (Maven, Docker, CodeQL) and a set of workshop exercises/tools in the workshop and tools directories.
File structure
Top-level components:
• Docker & CI: Dockerfile, docker-compose.yml, .github/workflows/devsecopsworkflow.yml
• Build: pom.xml, mvnw, .mvn/wrapper
• Application source (src/main/java/org/workshop/coffee):
– config/: security, resource, failure listener
– controller/: REST + Thymeleaf controllers (Login, Register, CRUD, Upload, ExploitableUpload)
– service/: business logic (OrderService, ProductService, PersonService, CustomUserDetailsService)
– repository/: data access (OrderRepository, PersonRepository, ProductRepository, search repos)
– domain/: JPA entities (Order, Person, Product, etc.)
– export/ and formatter/: XML/YAML import-export, formatters
– gadget/: proof-of-concept classes for vulnerability workshops
– exception/: custom exceptions
• Web resources (src/main/resources):
– templates/: Thymeleaf HTML views
– static/: CSS, JS assets
– application.properties: DB config, security settings
• Vulnerability training: src/CodeQL, tools/log4shellserver
• Workshop content: workshop/*
README
• Confirms it’s an intentionally vulnerable Spring Boot application used for security training with Thymeleaf UI.
a. Main components
1. Client Browser (UI)
2. Spring Boot Web App
• Presentation Layer: Thymeleaf templates + static assets served by HomeController, LoginController, etc.
• Controller Layer: REST endpoints & MVC controllers for orders, products, users, upload.
• Service Layer: business rules (OrderService, PersonService, ProductService).
• Data Layer: Spring Data JPA repositories connecting to the relational database.
• Security Module: SecurityConfig, ResourceConfig, AuthenticationFailureListener.
• Import/Export Module: XML/ YAML parsers & exporters.
3. Database (e.g., H2, PostgreSQL configured in application.properties)
4. External Services
• CodeQL scanner (CI/CD)
• log4shellserver (vulnerability demo server)
• (Optional) Search engine if used by ExploitableSearchRepository
b. Relationships and interactions
• Browser → Spring Boot (HTTP requests to controllers)
• Controllers → Services (method calls)
• Services → Repositories (JPA operations → Database)
• Import/Export module ↔ File system (uploads/downloads)
• Security filters intercept Browser ↔ Controllers calls
• CI workflow triggers CodeQL scan → source code repo
• Workshop tools and log4shellserver are external demonstration targets
c. Architectural patterns & principles
• Layered architecture (Presentation, Controller, Service, Repository)
• MVC pattern via Spring MVC + Thymeleaf
• Dependency injection in configs & services
• Use of Spring Security for authentication/authorization
• Modular feature packages (export, gadget, exception)
d. Relevant technologies
• Java 17+, Spring Boot, Spring MVC, Spring Security, Spring Data JPA
• Thymeleaf (view templates)
• Maven (build), Docker, Docker Compose
• CodeQL (static analysis), GitHub Actions (CI/CD)
• Workshop tools (Java-based log4shellserver)