This project demonstrates a simple Golang web server integrated with a DevSecOps pipeline using GitHub Actions. The pipeline includes static code analysis, container security scanning, and dynamic application security testing (DAST).
├── Dockerfile
├── go.mod
├── main.go
├── readme.md
└── .github/
└── workflows/
└── security_scan.yml
- Golang installed on your local machine
- Docker installed on your local machine
- GitHub account
-
Clone the repository:
git clone https://github.com/yourusername/automated-devsecops-golang.git cd automated-devsecops-golang -
Install dependencies:
go mod tidy
To run the web server locally, use the following command:
go run main.goThe server will start on http://localhost:8080.
To build the Docker image, use the following command:
docker build -t yourusername/automated-devsecops-golang .To run the Docker container, use the following command:
docker run -p 8080:8080 yourusername/automated-devsecops-golangThis project uses GitHub Actions for CI/CD. The pipeline is defined in .github/workflows/security_scan.yml and includes the following steps:
- Static Code Analysis: Uses
golangci-lintto perform static code analysis. - Container Security Scanning: Uses
Trivyto scan the Docker image for vulnerabilities. - Dynamic Application Security Testing (DAST): Uses
OWASP ZAPto perform dynamic security testing on the running application.
Contributions are welcome! Please open an issue or submit a pull request for any changes.
This project is licensed under the MIT License.