Introduction To Secure Desgin Flashcards

(7 cards)

1
Q

What is modularity

A

Breaking a program into single modules, makes code easier to manage, test, and update
It also limit impact of bugs or security flaws

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

Example when using Django for Modularity

A

In app like user, payment, and order are separated in Django module, for example vulnerability in payment dosent affect user or orders

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

What is Encapsulation?

A

Encapsulation is the practice of hiding internal data and logic, exposing only what’s necessary.

✅ Prevents direct access to sensitive parts of the code
✅ Protects from accidental misuse or malicious exploitation

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

Encapsulation when using Django

A

Using private functions or internal classes in views/models

Only exposing APIs or URLs needed by the frontend, keeping others inaccessible

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

Modularity for Security in Django

A

Encourages separation of concerns

You can apply security controls per module (e.g. only authenticated users access the admin app)

Easier to test and patch vulnerabilities without breaking the whole project

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

Encapsulation for Security in Django

A

Sensitive logic (e.g. password hashing) is hidden in secure modules

Form validation and CSRF tokens are encapsulated in Django’s forms system

Prevents frontend users from seeing or manipulating backend logic

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

Why use both of modularity and encapsulation

A

Reduce the chance of accidental security breaches

Limit the scope of an attack if a vulnerability is found

Help maintain clean, secure, and scalable code

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