exam questions

Exam CAS-004 All Questions

View all questions & answers for the CAS-004 exam

Exam CAS-004 topic 1 question 251 discussion

Actual exam question from CompTIA's CAS-004
Question #: 251
Topic #: 1
[All CAS-004 Questions]

A company wants to securely manage the APIs that were developed for its in-house applications. Previous penetration tests revealed that developers were embedding unencrypted passwords in the code. Which of the following can the company do to address this finding? (Choose two.)

  • A. Implement complex, key-length API key management.
  • B. Implement user session logging.
  • C. Implement time-based API key management.
  • D. Use SOAP instead of restful services.
  • E. Incorporate a DAST into the DevSecOps process to identify the exposure of secrets.
  • F. Enforce MFA on the developers’ workstations and production systems.
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
YUYUY
Highly Voted 10 months, 3 weeks ago
Selected Answer: AC
This one took some thought, but then it became clear. The only problem stated in the question was the plain text passwords in code. So how do you remove passwords from APIs? API Keys to replace the passwords! A and C are the only options that make sense and they both can be applied at the same time. B. This may help us detect misuse, but why wait for an issue to happen when you can mitigate the risk with API keys? D. This one is just irrelevant. E. This answer would be perfect if it said SAST or IAST instead of DAST. DAST's don't scan source code. F. MFA only secures the computers, the clear text passwords are within an API so they are still going across the network.
upvoted 5 times
...
deeden
Most Recent 22 hours, 11 minutes ago
Selected Answer: AE
DAST cannot directly scan source code to identify hardcoded secrets. This is beyond its scope as it analyzes the application as a black-box system. It is better at detecting the symptoms of embedded secrets (e.g., weak or static authentication) rather than the root cause. For direct detection of embedded keys or passwords, a Static Application Security Testing (SAST) tool is more appropriate.
upvoted 1 times
deeden
22 hours, 10 minutes ago
C. Implement time-based API key management: Time-based keys can be a good secondary control, but without addressing the core issue (embedded passwords), this alone is insufficient to solve the problem. D. Use SOAP instead of restful services: Switching to SOAP is not a direct solution for securing credentials. SOAP can still suffer from the same issue if credentials are embedded in the code. F. Enforce MFA on the developers’ workstations and production systems: MFA enhances access control for developers, but it does not address the problem of hardcoded passwords in the application code.
upvoted 1 times
...
...
Bright07
1 week, 2 days ago
Selected Answer: AE
A. Implement complex, key-length API key management. API keys are often used for authentication in APIs. By managing API keys securely (e.g., using complex, long keys), the company can reduce the risk of exposed secrets. This could include implementing key rotation, encryption, and storing keys in secure vaults rather than hardcoding them in source code. Properly managing API keys can prevent attackers from easily accessing sensitive systems in case a key is compromised. E. Incorporate a DAST into the DevSecOps process to identify the exposure of secrets. Dynamic Application Security Testing (DAST) tools can automatically scan running applications and APIs for vulnerabilities, including exposed secrets (like passwords). This would allow the company to identify unencrypted passwords in the code during development or testing before the application is deployed to production. DAST tools can be integrated into the DevSecOps process to continuously monitor for such security issues.
upvoted 1 times
...
23169fd
4 months, 4 weeks ago
Selected Answer: AE
A. Implement complex, key-length API key management: This ensures that API keys are strong and secure, making it harder for attackers to guess or brute-force them. Complex and sufficiently long keys reduce the risk of unauthorized access. E. Incorporate a DAST into the DevSecOps process to identify the exposure of secrets: Dynamic Application Security Testing (DAST) tools can scan running applications to detect vulnerabilities, including the exposure of sensitive information such as unencrypted passwords. Integrating DAST into the DevSecOps pipeline helps in identifying and addressing these security issues early in the development process.
upvoted 2 times
...
AGUDLP
5 months ago
Selected Answer: AE
The company can address the finding by choosing the following two options: A. Implement complex, key-length API key management. API key management involves generating, distributing, and revoking API keys. By implementing complex, key-length API key management, the company can ensure that only authorized entities have access to the APIs. This can help prevent unauthorized access and reduce the risk of sensitive information, such as passwords, being embedded in the code. E. Incorporate a DAST (Dynamic Application Security Testing) into the DevSecOps process to identify the exposure of secrets. DAST is a testing process that involves inspecting an application in its running state for security vulnerabilities. By incorporating DAST into the DevSecOps process, the company can identify instances where secrets, such as passwords, are being exposed in the code. This can help the company address these issues before the application is deployed.
upvoted 4 times
...
isaphiltrick
5 months ago
Selected Answer: CE
I believe C & E are the best answers for these reasons: C. Implement time-based API key management: Time-based API key management involves issuing API keys that have a limited validity period. This approach reduces the risk associated with compromised or leaked keys because they automatically expire after a certain timeframe. It's a practical approach to mitigating the impact of potential exposure of API keys, including unencrypted passwords embedded in code. E. Incorporate a DAST into the DevSecOps process to identify the exposure of secrets: Dynamic Application Security Testing (DAST) tools are crucial for identifying vulnerabilities in deployed applications and APIs. While they don't directly inspect source code, they perform black-box testing to simulate attacks and identify potential security weaknesses, including exposed secrets like unencrypted passwords in APIs.
upvoted 1 times
isaphiltrick
5 months ago
Here's why I don't think it's A. Implement complex, key-length API key management: While strong and complex API keys are important for security, they do not directly mitigate the risk of embedding unencrypted passwords in code. This answer choice focuses more on the strength and complexity of keys rather than addressing the specific issue of unencrypted passwords.
upvoted 2 times
...
...
hb0011
11 months ago
MFA makes no sense here. It does nothing for hardcoded secrets in code.
upvoted 2 times
...
Trap_D0_r
11 months, 1 week ago
Lol, I may not know everything but I know this question has NOTHING to do with MFA at all. "Developers are doing bad coding so... make sure they use authy to log into their laptop??? What???" E. DAST is what they're already doing--thats how they discovered the security issue. Keep doing it to make sure the developers don't do something else stupid. C. There's OBVIOUSLY no key management going on here. The Developers are just writing passwords into the source code, which will break the API when they keys change. In order to fix the problem, use a time-based key management strategy (sometimes called SECRET ROTATION if you're using SECRETS MANAGER). This will cause the keys to cycle every X amount of time, which means if the developers keep trying to hard code passwords, those passwords will require regular update in the source code, and before long they'll realize it's easier just to source the key directly from the secrets manager than to keep updating their source code. This solution forces the developers to do their job correctly, and is in alignment with industry best practices.
upvoted 2 times
...
abrub
11 months, 1 week ago
Selected Answer: CE
To address the finding of unencrypted passwords embedded in the code for API management, the company can take the following actions: Implement time-based API key management (Option C): Time-based API key management involves regularly rotating or changing the API keys, reducing the impact of compromise if keys are exposed. This is especially important if developers are embedding unencrypted passwords in the code. Incorporate a DAST into the DevSecOps process to identify the exposure of secrets (Option E): Dynamic Application Security Testing (DAST) involves scanning applications during runtime to identify security vulnerabilities, including the exposure of secrets. By incorporating DAST into the DevSecOps process, the company can regularly scan the APIs for security issues, including the presence of unencrypted passwords. Options A, B, D, and F are not directly addressing the issue of unencrypted passwords in the code
upvoted 1 times
...
Anarckii
12 months ago
Selected Answer: AC
after multiple run throughs and question, DAST would not be correct because Dynamic analysis and testing will not look at the source code for embedded information. So E is out of the question. In consideration we can look at the Application Programming Interface though and implement key management for passwords. This way there is encryption and integrity. B - Session logs wouldn't help the situation C - Key management is already being worked on why not enhance it even more since its resolving the current issues identified D - SOAP is just a joke in this situation E - already discussed F - Another great form of security but focuses on the workstation and not the application. If it directed towards MFA with the application it would be correct
upvoted 3 times
Anarckii
11 months, 3 weeks ago
Changing to E and F for these reasons: E. Incorporate a DAST into the DevSecOps process to identify the exposure of secrets: Dynamic Application Security Testing (DAST) tools can identify vulnerabilities, including the exposure of secrets, during runtime. They simulate attacks on a running application to discover security issues. In this context, DAST can help identify instances where passwords are exposed. F. Enforce MFA on the developers’ workstations and production systems: Multi-Factor Authentication (MFA) adds an extra layer of security to access control. Enforcing MFA on developer workstations and production systems can help mitigate the risk of unauthorized access, especially if passwords are compromised. While MFA doesn't directly prevent embedding passwords, it enhances overall access security.
upvoted 1 times
YUYUY
10 months, 3 weeks ago
I know a Chat GPT response when I see one. lol I think your first answer was right though. AC
upvoted 4 times
...
...
...
ThatGuyOverThere
1 year, 1 month ago
Selected Answer: AC
I'm going with A and C. I don't see how the others are relevant to the question's specifics. DAST doesn't look at source code so you'd need SAST.
upvoted 3 times
...
p1s3c
1 year, 7 months ago
Selected Answer: EF
Based on the given scenario, the two BEST solutions to address the finding of unencrypted passwords embedded in code are: E. Incorporate a DAST into the DevSecOps process to identify the exposure of secrets: Dynamic Application Security Testing (DAST) can help detect vulnerabilities in an application's API security, including issues with password management. By incorporating DAST into the DevSecOps process, the company can identify the exposure of secrets and other vulnerabilities early in the development cycle. F. Enforce MFA on the developers’ workstations and production systems: Multi-Factor Authentication (MFA) can help prevent unauthorized access to systems and applications. By enforcing MFA on the developers’ workstations and production systems, the company can reduce the risk of attackers gaining access to sensitive information and passwords.
upvoted 2 times
...
Amin4799
1 year, 8 months ago
Selected Answer: EF
E. Incorporate a DAST (Dynamic Application Security Testing) into the DevSecOps process to identify the exposure of secrets. This will help the company to identify the potential vulnerabilities in the API codes and take necessary measures to address them. F. Enforce MFA (Multi-Factor Authentication) on the developers’ workstations and production systems. This will ensure that the authentication process is more secure and reduce the chances of unencrypted passwords being embedded in the code.
upvoted 4 times
...
Geofab
1 year, 8 months ago
Selected Answer: CE
for sure E is part of the answer (DAST). I think the next part of the answer is C because it would eliminate the need to hard code unencrypted passwords in code. maybe the devs are doing that because they have to in order for the API to work.
upvoted 3 times
...
Cock
1 year, 8 months ago
Selected Answer: BE
The options that can address the finding of unencrypted passwords in the code are: B. Implement user session logging: This option is useful for tracking the activities of users and developers. It can help identify which users are accessing the API and monitor their session activities. E. Incorporate a DAST into the DevSecOps process to identify the exposure of secrets: This option is useful for identifying potential security vulnerabilities in the API code. By using a dynamic application security testing (DAST) tool, developers can scan the API code to detect any exposed secrets or unencrypted passwords.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago