Latest / CyberCode Academy / Course 7 - Secure SDLC (Software Development Life Cycle) | Episode 4: Integrating Secure Coding, Code Review, and Application Security Testi
Transcript
- 0:00Speaker 1: Welcome to the deep dive. If you're in software development,
- 0:03Speaker 1: you know the feeling that last minute panic before a launch.
- 0:07Speaker 2: The frantic security test, hoping nothing major breaks exactly.
- 0:11Speaker 1: So today we're exploring an idea that flips that whole script.
- 0:15Speaker 1: We're talking about making security the very foundation of your software,
- 0:19Speaker 1: a practice we call secure build.
- 0:21Speaker 2: And that's really the mission for our deep dive today.
- 0:24Speaker 2: Secure build is it's about embedding security right into the
- 0:28Speaker 2: development method itself.
- 0:29Speaker 1: It's not an afterthought, not at all.
- 0:31Speaker 2: It's a mix of defined standards and some really smart
- 0:35Speaker 2: automated tools. The goal is to make sure the apps
- 0:37Speaker 2: you're building are secure from day one. In the actual code.
- 0:41Speaker 1: We hear the phrase shifting left all the time. Find
- 0:44Speaker 1: vulnerabilities earlier, but the usual reason it costs more to
- 0:47Speaker 1: fix later feels a little, I don't know, a bit tired.
- 0:50Speaker 1: There has to be a better reason.
- 0:52Speaker 2: There is, and it's something that resonates way more with
- 0:54Speaker 2: engineering teams. It's what we call context switching debt.
- 0:57Speaker 1: Context switching debt. Okay, I like that break that down
- 1:00Speaker 1: for us.
- 1:01Speaker 2: Well, think about it. A developer writes some code, six
- 1:04Speaker 2: months go by, a vulnerability is found in production right now,
- 1:09Speaker 2: that developer has to stop working on their cool new
- 1:11Speaker 2: feature and they have to mentally go back in time
- 1:14Speaker 2: refamiliarize themselves with code they barely remember.
- 1:17Speaker 1: And the logic, the dependencies. It's all gone completely.
- 1:21Speaker 2: That mental burden, that friction, that's the debt shifting left
- 1:26Speaker 2: isn't just about saving security money. It's a massive productivity
- 1:30Speaker 2: saving for the whole engineering team.
- 1:32Speaker 1: That completely reframes the why. So to make this happen,
- 1:36Speaker 1: who needs to be involved? It's not just the.
- 1:38Speaker 2: Developers, oh not at all. It's a really collaborative effort.
- 1:42Speaker 2: Your software developers are central of course, of course, but
- 1:44Speaker 2: then you have your database teams making sure permissions and
- 1:47Speaker 2: rolls are locked down. You have your network in infrastructure
- 1:49Speaker 2: teams handling cloud configs and access. Everyone has a piece
- 1:53Speaker 2: of the puzzle.
- 1:53Speaker 1: Okay, so let's unpack that first big piece for the
- 1:56Speaker 1: dev teams secure coding guidelines. I mean, we hire good developers,
- 2:00Speaker 1: but how do you get hundreds of people to code
- 2:03Speaker 1: in the same threat resistant way.
- 2:06Speaker 2: It comes down to governance and really training. You need
- 2:10Speaker 2: a uniform set of rules that everyone follows, and those
- 2:12Speaker 2: rules have to come directly from the project's security requirements.
- 2:16Speaker 1: It's not arbitrary, no, and it.
- 2:18Speaker 2: Requires training, not just once, but continuous education. So it
- 2:22Speaker 2: becomes second nature, you know, regardless of how senior a
- 2:25Speaker 2: developer is.
- 2:26Speaker 1: And thankfully, modern frameworks give us a leg up here.
- 2:29Speaker 1: You don't have to like invent your own cryptography library.
- 2:32Speaker 2: You don't, absolutely not. Smart developers lean on the security
- 2:36Speaker 2: libraries built right into their frameworks for things like validation, encoding, authentication,
- 2:43Speaker 2: the tricky stuff, the really tricky stuff. When you rely
- 2:46Speaker 2: on the official docs for Java or dot net, where
- 2:49Speaker 2: the best practices for iOS and Android, you're standing on
- 2:52Speaker 2: the shoulders of giants. You avoid all those common, easy
- 2:55Speaker 2: to make mistakes.
- 2:56Speaker 1: So the goal here is to find and fix things
- 2:58Speaker 1: while the developer is still in those zone, still has
- 3:01Speaker 1: that code fresh in their mind.
- 3:02Speaker 2: That's it. You eliminate that context switching debt before it
- 3:05Speaker 2: even starts. The code has to be cleaned before it
- 3:07Speaker 2: even gets committed.
- 3:08Speaker 1: Okay, so we're writing clean code. Now we have to
- 3:11Speaker 1: check it. This brings us to secure code review. Now
- 3:15Speaker 1: this sounds slow. How does a manual review process not
- 3:20Speaker 1: just grind a fast CICD pipeline to a halt.
- 3:24Speaker 2: That's the vital question. And the key is that a
- 3:26Speaker 2: secure code review isn't a functional review. It's a specialized.
- 3:30Speaker 1: Audit focus only on security, only.
- 3:32Speaker 2: On security weaknesses, and its goal isn't to find every
- 3:36Speaker 2: single tiny bug. It's to give you insight into the
- 3:39Speaker 2: types and classes of vulnerabilities you have.
- 3:41Speaker 1: Ah, So you're looking for patterns exactly.
- 3:43Speaker 2: You find one instance of, say a cross site scripting vulnerability,
- 3:47Speaker 2: and you can retrain that developer and the whole team
- 3:50Speaker 2: to avoid that entire class of flaw going forward. It
- 3:53Speaker 2: scales your security knowledge.
- 3:55Speaker 1: So what are you looking for specifically? What makes it
- 3:57Speaker 1: different from just you know, a normal code review and.
- 4:00Speaker 2: Things functional tests, which is fly past like our security
- 4:03Speaker 2: events actually being logged properly. Can someone bypass? Authentication is
- 4:07Speaker 2: the software and this is a big one, dumping user
- 4:09Speaker 2: passwords into log files and plain text.
- 4:11Speaker 1: Ouch, yeah, I've seen that happen.
- 4:13Speaker 2: It happens. We're also checking if user input is validated,
- 4:17Speaker 2: memory management is sound, unneeded, ports are closed, all that
- 4:22Speaker 2: deep stuff.
- 4:23Speaker 1: Okay, so there's a formal four step process for this.
- 4:25Speaker 1: Let's walk through what's step one.
- 4:27Speaker 2: Step one is source code access. It's the prep work
- 4:30Speaker 2: before you even look at a line of code. You
- 4:32Speaker 2: have to know what you're dealing with, what language is,
- 4:36Speaker 2: what web servers like apatche tomcat, what database is?
- 4:39Speaker 1: The whole stack?
- 4:40Speaker 2: The whole stack, and crucially you verify that every single
- 4:44Speaker 2: piece of it is a recent patched version. If you're
- 4:48Speaker 2: running on five year old tech, you've already lost.
- 4:50Speaker 1: So after you have that inventory, what's next.
- 4:52Speaker 2: Step two is review to uncover. This is where you
- 4:56Speaker 2: apply business logic. You classify your goals based on the
- 4:59Speaker 2: applicantation's risk right.
- 5:01Speaker 1: So an internal forum has a lower risk profile than
- 5:04Speaker 1: say on internet banking.
- 5:05Speaker 2: App massively lower. You focus your effort on what protects identity,
- 5:09Speaker 2: financial data, reputation, or what keeps you compliant with regulations.
- 5:13Speaker 2: You can't review everything with the same intensity, makes sense?
- 5:16Speaker 1: Now, Step three is reporting. This is where things can
- 5:21Speaker 1: get noisy. How do you deal with all the false
- 5:23Speaker 1: positives that just make developers two?
- 5:25Speaker 2: Now this is where the manual rigor is non negotiable.
- 5:29Speaker 2: You have to manually verify the findings to eliminate that noise.
- 5:32Speaker 2: You talk to the developers, you confirm the data flow.
- 5:35Speaker 2: Then you assign a risk level critical high, moderate.
- 5:39Speaker 1: Low, so you're not just handing them a list of
- 5:41Speaker 1: five hundred things. You're saying, here are the three things
- 5:44Speaker 1: you must fix now.
- 5:45Speaker 2: Precisely, the report has to be prioritized and it has
- 5:48Speaker 2: to be comprehensive with clear advice on how to fix things,
- 5:52Speaker 2: so it becomes a reference tool.
- 5:53Speaker 1: And that leads to the final step, remediation. I'm guessing
- 5:56Speaker 1: a critical vulnerability is a showstopper.
- 5:59Speaker 2: It has to be. Remediation is about tracking the fixes,
- 6:01Speaker 2: usually in a tool like Gira. And yes, anything rated
- 6:04Speaker 2: critical or high must be fixed before that code goes
- 6:07Speaker 2: to production, no exceptions.
- 6:08Speaker 1: Okay, the manual process gives you that depth, but for
- 6:11Speaker 1: speed you need automation. Let's talk about the tools, starting
- 6:15Speaker 1: with SaaS Static Application Security Testing right.
- 6:18Speaker 2: SaaS is the developer's tool. It's a white box.
- 6:20Speaker 1: Approach, meaning it can see it inside the.
- 6:23Speaker 2: Code exactly, and it's very sophisticated. It's not just you know,
- 6:27Speaker 2: searching for keywords. It builds what's called an abstract syntax.
- 6:30Speaker 1: Tree, a model of the code's structure.
- 6:33Speaker 2: Yes, a structural representation, and then it performs data flow
- 6:37Speaker 2: analysis to trace how untrusted data moves through the application.
- 6:41Speaker 1: And this all happens without actually running the program correct.
- 6:44Speaker 2: It scans the source code or the binaries directly, and
- 6:47Speaker 2: because it's so early and so fast, you can plug
- 6:50Speaker 2: it right into a developer's ide like visual Studio for
- 6:53Speaker 2: real time feedback, or.
- 6:55Speaker 1: Into the main CICD pipeline like Jenkins exactly.
- 6:58Speaker 2: Tools like cover d or LGTN are great examples. They
- 7:01Speaker 2: can find complex flaws and give you recommendations on the spot.
- 7:04Speaker 1: Okay, now let's move to its cousin, IAST Interactive Applications
- 7:08Speaker 1: Security testing. What's the fundamental difference here.
- 7:11Speaker 2: The difference is runtime ISAT analyzes code for vulnerabilities while
- 7:16Speaker 2: the application is running.
- 7:17Speaker 1: So during QA testing, yes, it's.
- 7:19Speaker 2: More of a gray box approach. The key mechanism is
- 7:23Speaker 2: that the IST tool instruments the application. It literally puts
- 7:26Speaker 2: probes inside the running code. This lets it see exactly
- 7:30Speaker 2: which lines of code are executed and what data is
- 7:33Speaker 2: being processed during a live test.
- 7:35Speaker 1: So wait, SAAST scans everything and tells you what might
- 7:38Speaker 1: be a problem. ISD only flags issues that are actually
- 7:41Speaker 1: triggered during a test.
- 7:43Speaker 2: That is the strategic insight. Yes, because SAST is static,
- 7:47Speaker 2: it can have a pretty high rate of false positives.
- 7:50Speaker 2: Things that look bad but aren't actually exploitable.
- 7:52Speaker 1: But ist confirms it.
- 7:53Speaker 2: Istek confirms it during live execution, so it effectively eliminates
- 7:57Speaker 2: false positives. The results you get are high fidelity, real
- 8:00Speaker 2: time and directly tied to what your functional tests are covering.
- 8:03Speaker 1: And it doesn't slow down the pipeline because it just
- 8:05Speaker 1: runs alongside the test you're already doing exactly.
- 8:08Speaker 2: It's a perfect fit for API testing for micro services.
- 8:11Speaker 2: Anywhere you have a solid automated test suite, ISD can
- 8:14Speaker 2: deliver incredibly actionable feedback.
- 8:16Speaker 1: Okay, so we've written our own code perfectly, We've scanned
- 8:19Speaker 1: it with SaaS and tested it with IST, But what
- 8:22Speaker 1: about all the external libraries we pull in? How do
- 8:25Speaker 1: we secure the parts we didn't write.
- 8:28Speaker 2: That's where open source analyzers or OSA come in. People
- 8:32Speaker 2: also call it software component analysis or SCA, and the
- 8:35Speaker 2: goal is simple, make sure all your third party libraries
- 8:39Speaker 2: are up to date and free from known vulnerabilities, because
- 8:43Speaker 2: maintainers are releasing security fixes literally every day.
- 8:46Speaker 1: And the real monster isn't just the libraries you add yourself,
- 8:49Speaker 1: it's the libraries they depend on.
- 8:50Speaker 2: That's the one transitive dependencies. The dependencies of your dependencies
- 8:55Speaker 2: it's a huge tree. Sea tools are built to map
- 8:58Speaker 2: out that entire tree and the risks.
- 9:00Speaker 1: So tools like the OAS dependency check or even the
- 9:03Speaker 1: alerts built right into GitHub.
- 9:05Speaker 2: Now, yes, those are essential. They help you manage that
- 9:09Speaker 2: operational debt that builds up over time when components go unmaintained.
- 9:12Speaker 1: And finally, it's worth mentioning that just general code quality
- 9:15Speaker 1: tools can help with security too. Oh.
- 9:17Speaker 2: Absolutely, there is a huge correlation between code quality and security.
- 9:22Speaker 2: Tools like sonar, queb or spot bugs, especially with security plugins,
- 9:26Speaker 2: help find dead code, bad functions, outdated libraries.
- 9:29Speaker 1: Cleaning up the code in general just reduces the attack
- 9:32Speaker 1: surface exactly.
- 9:33Speaker 2: A higher standard of quality inherently raises your security posture.
- 9:38Speaker 1: This has been a really thorough deep dive. So to
- 9:41Speaker 1: bring it all together for you listening, it starts with
- 9:44Speaker 1: strong secure coding guidelines, Then you enforce that with a
- 9:48Speaker 1: rigorous four step secure code review.
- 9:51Speaker 2: Then you automate. You bring in SAAST your white box scanner,
- 9:54Speaker 2: and IST your gray box runtime tool, and you underpin
- 9:57Speaker 2: all of it with OSA to manage your software supply chain.
- 10:00Speaker 1: And the big takeaway here, the real benefit for you
- 10:02Speaker 1: is understanding that these processes let you move away from
- 10:05Speaker 1: reactive firefighting.
- 10:06Speaker 2: Yes, you can focus your teams on proactive security engineering
- 10:10Speaker 2: and you get that massive productivity win by cutting down
- 10:13Speaker 2: on that context switching debt we talked about at the start.
- 10:15Speaker 1: So, since SaaS and iised are so different, here's our
- 10:19Speaker 1: final thought for you to take away. Why does iis,
- 10:22Speaker 1: even though it requires a running application and good test coverage,
- 10:25Speaker 1: often provide faster, more actionable results for a developer than
- 10:29Speaker 1: a complete SaaS scan, And the.
- 10:31Speaker 2: Hint is in the signal to noise ratio. Think about
- 10:34Speaker 2: which tool gives you confirmation that something is truly exploitable.
- 10:37Speaker 2: That's why Devskov's teams value both, but often jump on
- 10:40Speaker 2: ISED results first.
- 10:42Speaker 1: We really encourage you to keep exploring the phases of
- 10:44Speaker 1: a secure SDLC. Thanks for diving deep with us.