Automate WebApp Security Testing using GitHub Actions (from StackHawk team)

Rate this content
Bookmark

Software development has changed - Frequent deployments, APIs, GraphQL, Cloud Architecture and CI/CD Automation are the norm. So why is security testing the same way it was a decade ago?


Leading teams are realizing that periodical penetration testing and security audits is not enough when code is being shipped daily. Instead, these teams are using developer-centric tools to run automated security testing in a CI/CD pipeline. Join Zachary Conger as he walks through how to automate application JS security testing using GitHub actions.

FAQ

The main focus of the Test.js workshop is to automate web app security testing using Java and React, and to integrate security testing into the CI/CD pipeline using GitHub Actions.

Participants can join the Discord channel by clicking on the provided Discord link, joining the October 2022 web app security testing channel, and giving a thumbs up to the welcome message in the general channel.

GitHub Actions is a CI/CD system built into GitHub that automates software workflows, including building, testing, and deploying code. In the workshop, it is used to automate the build and test routine for a Node.js application.

The workshop introduces several tools for security testing, including Dependabot for scanning dependencies, CodeQL for scanning code bases for vulnerabilities, and StackHawk, a DAST utility for dynamic application security testing.

Attendees can fork and set up the sample application by accessing a specific GitHub repository link provided during the workshop, clicking the 'Fork' button, and then following instructions to create necessary workflow files using GitHub Actions.

To configure Dependabot, attendees need to navigate to the Settings section of their forked repository, enable the dependency graph, dependency alerts, and Dependabot security updates under the 'Code Security and Analysis' settings.

The StackHawk scanner is configured by creating a stackhawk.yml file with specific application details and API keys. It is used to perform dynamic security testing against the running application in the CI/CD pipeline.

CodeQL is used in the workshop to scan the codebase for vulnerable patterns that could lead to security issues. It helps identify potential vulnerabilities directly in the source code, enhancing the security testing process.

Participants verify their actions and progress by committing changes to their GitHub repository, observing the execution of GitHub Actions workflows, and checking the results of security scans and tests through the GitHub interface and StackHawk platform.

Zachary Conger
Zachary Conger
87 min
27 Oct, 2022

Comments

Sign in or register to post your comment.

Video Summary and Transcription

Welcome to the Test.js and DevSecOps workshops, where we automate web app security testing using Java, React, and StackHawk's DAST utility. We cover setting up GitHub Actions, scanning dependencies with Dependabot, using CodeQL for static analysis, and running StackHawk's DaaST scanner for runtime vulnerability testing. The workshops provide step-by-step instructions for setting up workflows, configuring security testing tools, and reviewing scan results to identify and fix vulnerabilities in the codebase.

1. Introduction to Test.js Workshop

Short description:

Welcome to Test.js workshop. We'll be automating web app security testing using Java and React. Fork a repo, submit questions, and subject the application to automated build and test routines using GitHub actions. Join our Discord server and the October 2022 web app security testing channel. Give a thumbs up in the general channel and the web app security testing channel to participate.

Welcome to Test.js workshop. Invitees and attendees, it's great to see everybody on here. I wanted to welcome you to our little show that we've got, what we're going to do today is. Automate web app security testing using Java and React. Is a web browser.

It helps to have a Discord, the Discord app, we're going to be doing a lot of chatting in discord, and I'll tell you about that in a minute. But what we're going to do basically is we're going to, we're going to fork a repo for a sample application, a node.js application. And what we're doing in this workshop is we're going to ask you guys to submit questions application, a node.js application. And we're going to subject that to an automated build and test routine using GitHub actions, which is GitHub's CICD system that's built into GitHub, and it's free for use for anybody for up to, like, 2000 minutes a month, something like that.

So we're going to build that application, and then we're going to subject it to a bunch of testing, a variety of different security tests. And again, all you really need is a web browser, because everything we're going to be doing is through the GitHub web interface so that we can create files, fork a repo, create file, the files that we need, run the test that we need using GitHub actions and so forth. What you need for this, really, the primary thing that you need to join us is to join our Discord. And to join the October 2022 web app security testing channel in Discord. So, I'm going to post that link here for everybody. So, if you can go to the first link that I provide, the discord.gg.xnmb.. Click that link and you should join our Discord server. And then from there, in the general channel, just give a thumbs up to our welcome message. That'll allow you to see the rest of the channels. Then once you're there, join that October 2022 web app security testing channel. And then when you get into that web app security testing channel, give us a thumbs up there too, so that we know that you're in there.

2. Getting Started with the Workshop

Short description:

We already have a question. So, it seems that I cannot check out the repos. Don't worry about that. You can just look at the repo through our website. When you get to this workshop GitHub actions GitHub repo, all you really need from there is this readme, and you can click on links to get to stuff in there. The first thing we'll be doing when we create the app is we're going to fork another repo. Looks like we've got folks joining in on the discord server. So, here's the workbook, or the guide book for the workshop that we'll be going through. If any of this stuff is not working, you should still be able to follow along. Again, really all you need is a web browser and access to GitHub, so a GitHub account. Feel free to drop questions and help each other out in the Discord chat. I'll just begin with a slide.

We already have a question. This is awesome. So, it seems that I cannot check out the repos. Don't worry about that. You can just look at the repo through our website. We're just following along in the readme that's in there. So, I'll show you what that looks like. When you get to this workshop GitHub actions GitHub repo, all you really need from there is this readme, and you can click on links to get to stuff in there.

The first thing we'll be doing when we create the app is we're going to fork another repo. All right. Looks like we've got folks joining in on the discord server. A GitHub link in the discussion panel window. I think we mean this window. So, let me give you this link. So, here's the workbook, or the guide book for the workshop that we'll be going through. If any of this stuff is not working, you should still be able to follow along. Again, really all you need is a web browser and access to GitHub, so a GitHub account. I'm going to go ahead and begin. Feel free to drop questions and help each other out in the Discord chat. And Mimi, if you can help folks along who are running into trouble, that would be awesome. I'll just begin with a slide. Thank you.

QnA

Watch more workshops on topic

Using CodeMirror to Build a JavaScript Editor with Linting and AutoComplete
React Day Berlin 2022React Day Berlin 2022
86 min
Using CodeMirror to Build a JavaScript Editor with Linting and AutoComplete
Top Content
WorkshopFree
Hussien Khayoon
Kahvi Patel
2 authors
Using a library might seem easy at first glance, but how do you choose the right library? How do you upgrade an existing one? And how do you wade through the documentation to find what you want?
In this workshop, we’ll discuss all these finer points while going through a general example of building a code editor using CodeMirror in React. All while sharing some of the nuances our team learned about using this library and some problems we encountered.
API Testing with Postman Workshop
TestJS Summit 2023TestJS Summit 2023
48 min
API Testing with Postman Workshop
Top Content
WorkshopFree
Pooja Mistry
Pooja Mistry
In the ever-evolving landscape of software development, ensuring the reliability and functionality of APIs has become paramount. "API Testing with Postman" is a comprehensive workshop designed to equip participants with the knowledge and skills needed to excel in API testing using Postman, a powerful tool widely adopted by professionals in the field. This workshop delves into the fundamentals of API testing, progresses to advanced testing techniques, and explores automation, performance testing, and multi-protocol support, providing attendees with a holistic understanding of API testing with Postman.
1. Welcome to Postman- Explaining the Postman User Interface (UI)2. Workspace and Collections Collaboration- Understanding Workspaces and their role in collaboration- Exploring the concept of Collections for organizing and executing API requests3. Introduction to API Testing- Covering the basics of API testing and its significance4. Variable Management- Managing environment, global, and collection variables- Utilizing scripting snippets for dynamic data5. Building Testing Workflows- Creating effective testing workflows for comprehensive testing- Utilizing the Collection Runner for test execution- Introduction to Postbot for automated testing6. Advanced Testing- Contract Testing for ensuring API contracts- Using Mock Servers for effective testing- Maximizing productivity with Collection/Workspace templates- Integration Testing and Regression Testing strategies7. Automation with Postman- Leveraging the Postman CLI for automation- Scheduled Runs for regular testing- Integrating Postman into CI/CD pipelines8. Performance Testing- Demonstrating performance testing capabilities (showing the desktop client)- Synchronizing tests with VS Code for streamlined development9. Exploring Advanced Features - Working with Multiple Protocols: GraphQL, gRPC, and more
Join us for this workshop to unlock the full potential of Postman for API testing, streamline your testing processes, and enhance the quality and reliability of your software. Whether you're a beginner or an experienced tester, this workshop will equip you with the skills needed to excel in API testing with Postman.
Testing Web Applications Using Cypress
TestJS Summit - January, 2021TestJS Summit - January, 2021
173 min
Testing Web Applications Using Cypress
WorkshopFree
Gleb Bahmutov
Gleb Bahmutov
This workshop will teach you the basics of writing useful end-to-end tests using Cypress Test Runner.
We will cover writing tests, covering every application feature, structuring tests, intercepting network requests, and setting up the backend data.
Anyone who knows JavaScript programming language and has NPM installed would be able to follow along.
Build a powerful DataGrid in few hours with Ag Grid
React Summit US 2023React Summit US 2023
96 min
Build a powerful DataGrid in few hours with Ag Grid
WorkshopFree
Mike Ryan
Mike Ryan
Does your React app need to efficiently display lots (and lots) of data in a grid? Do your users want to be able to search, sort, filter, and edit data? AG Grid is the best JavaScript grid in the world and is packed with features, highly performant, and extensible. In this workshop, you’ll learn how to get started with AG Grid, how we can enable sorting and filtering of data in the grid, cell rendering, and more. You will walk away from this free 3-hour workshop equipped with the knowledge for implementing AG Grid into your React application.
We all know that rolling our own grid solution is not easy, and let's be honest, is not something that we should be working on. We are focused on building a product and driving forward innovation. In this workshop, you'll see just how easy it is to get started with AG Grid.
Prerequisites: Basic React and JavaScript
Workshop level: Beginner
0 to Auth in an Hour Using NodeJS SDK
Node Congress 2023Node Congress 2023
63 min
0 to Auth in an Hour Using NodeJS SDK
WorkshopFree
Asaf Shen
Asaf Shen
Passwordless authentication may seem complex, but it is simple to add it to any app using the right tool.
We will enhance a full-stack JS application (Node.JS backend + React frontend) to authenticate users with OAuth (social login) and One Time Passwords (email), including:- User authentication - Managing user interactions, returning session / refresh JWTs- Session management and validation - Storing the session for subsequent client requests, validating / refreshing sessions
At the end of the workshop, we will also touch on another approach to code authentication using frontend Descope Flows (drag-and-drop workflows), while keeping only session validation in the backend. With this, we will also show how easy it is to enable biometrics and other passwordless authentication methods.
Table of contents- A quick intro to core authentication concepts- Coding- Why passwordless matters
Prerequisites- IDE for your choice- Node 18 or higher
Build a Powerful Datagrid With AG Grid
React Summit 2024React Summit 2024
168 min
Build a Powerful Datagrid With AG Grid
WorkshopFree
Brian Love
Brian Love
Does your React app need to efficiently display lots (and lots) of data in a grid? Do your users want to be able to search, sort, filter, and edit data? AG Grid is the best JavaScript grid in the world and is packed with features, highly performant, and extensible. In this workshop, you’ll learn how to get started with AG Grid, how we can enable sorting and filtering of data in the grid, cell rendering, and more. You will walk away from this free 3-hour workshop equipped with the knowledge for implementing AG Grid into your React application.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Scaling Up with Remix and Micro Frontends
Remix Conf Europe 2022Remix Conf Europe 2022
23 min
Scaling Up with Remix and Micro Frontends
Top Content
Do you have a large product built by many teams? Are you struggling to release often? Did your frontend turn into a massive unmaintainable monolith? If, like me, you’ve answered yes to any of those questions, this talk is for you! I’ll show you exactly how you can build a micro frontend architecture with Remix to solve those challenges.
Full Stack Components
Remix Conf Europe 2022Remix Conf Europe 2022
37 min
Full Stack Components
Top Content
Remix is a web framework that gives you the simple mental model of a Multi-Page App (MPA) but the power and capabilities of a Single-Page App (SPA). One of the big challenges of SPAs is network management resulting in a great deal of indirection and buggy code. This is especially noticeable in application state which Remix completely eliminates, but it's also an issue in individual components that communicate with a single-purpose backend endpoint (like a combobox search for example).
In this talk, Kent will demonstrate how Remix enables you to build complex UI components that are connected to a backend in the simplest and most powerful way you've ever seen. Leaving you time to chill with your family or whatever else you do for fun.
Making JavaScript on WebAssembly Fast
JSNation Live 2021JSNation Live 2021
29 min
Making JavaScript on WebAssembly Fast
Top Content
JavaScript in the browser runs many times faster than it did two decades ago. And that happened because the browser vendors spent that time working on intensive performance optimizations in their JavaScript engines.Because of this optimization work, JavaScript is now running in many places besides the browser. But there are still some environments where the JS engines can’t apply those optimizations in the right way to make things fast.We’re working to solve this, beginning a whole new wave of JavaScript optimization work. We’re improving JavaScript performance for entirely different environments, where different rules apply. And this is possible because of WebAssembly. In this talk, I'll explain how this all works and what's coming next.
Debugging JS
React Summit 2023React Summit 2023
24 min
Debugging JS
Top Content
As developers, we spend much of our time debugging apps - often code we didn't even write. Sadly, few developers have ever been taught how to approach debugging - it's something most of us learn through painful experience.  The good news is you _can_ learn how to debug effectively, and there's several key techniques and tools you can use for debugging JS and React apps.
Automating All the Code & Testing Things with GitHub Actions
React Advanced Conference 2021React Advanced Conference 2021
19 min
Automating All the Code & Testing Things with GitHub Actions
Top Content
Code tasks like linting and testing are critical pieces of a developer’s workflow that help keep us sane like preventing syntax or style issues and hardening our core business logic. We’ll talk about how we can use GitHub Actions to automate these tasks and help keep our projects running smoothly.
Webpack in 5 Years?
JSNation 2022JSNation 2022
26 min
Webpack in 5 Years?
Top Content
What can we learn from the last 10 years for the next 5 years? Is there a future for Webpack? What do we need to do now?