Secure Coding Concepts Flashcards

1
Q

Compiled Code vs Runtime code

A

Compliled code is optimized by a compiler and converted into an executable file, checking for errors and reporting back to the developer.
Runtime code is evaluated, interpreted, and executed when the code is run.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Input validation

A

The practice of checking data for validity before using it. Prevents an attacker from sending malicious code by sanitizing the input or rejecting it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are some common checks performed by input validation?

A

Verifying proper characters in certain fields
Implementing boundary/range checking
Blocking HTML code such as < and >
Preventing the use of specific characters (i.e. = ‘ -)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Race Condition

A

Occurs when 2 or more modules of an application or 2 applications attempt to access a resource at the same time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are 2 general guidelines to proper error-handling?

A
  • Make sure errors to users are general, to prevent an attacker from exploiting the system/application
  • Detailed error information should be logged, so that developers can identify the cause of the error.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Code Signing

A

The practice of using a certificate and associating it with an application or code. Provides the code with a digital signature and the certificate includes a hash of the code.

  • Certificate identifies the author.
  • The hash verifies that the code has not been modified.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Code Obfuscation

A

The practice of making code more difficult to read or understand, such as renaming variables, replacing strings of characters with hexadecimal characters, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Static code analysis vs Dynamic analysis

A

Static analysis examines the code without actually executing it.
Dynamic analysis checks the code while it’s running via fuzzing (sends random data to an application to see how it is handled)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Stress Testing

A

Simulates a live environment to determine how effective an application will operate with a load.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Sandboxing

A

The practice of testing an application in an isolated environment, so that any changes made will not affect anything outside of it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The Waterfall SDLC model

A

Uses multiple stages going from top to bottom, with each stage feeding the next. When followed strictly, when one stage is completed, you do not return to it. Can lack flexibility as it’s difficult to revise things from previous stages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The Agile SDLC model

A

Uses a set of principles shared by cross-functional teams, stressing interaction, creating a working application, collaborating with the customer, and responding to change. Uses iterative cycles rather than stages, with each cycle creating a working product. The next cycle adds changes from the previous one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Secure DevOps

A

An agile-aligned methodology that stresses security throughout the life cycle of the project. Can allow developers to push out multiple updates daily in response to changing business needs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Continuous Integration

A

The process of merging changes in code into a central repository, in which the software is then built+tested from this repository.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Baselining (in context of DevOps)

A

Application of changes to the baseline code every day and then building the code from those changes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Infrastructure as Code

A

refers to managing and provisioning data centers with code that defines VMs.