LearnIPAReviewHistory
Profile
AboutHow I passedUse with AIFeedback
LearnIPA
Review
History
Profile
LearnIPAReviewHistory
Profile
AboutHow I passedUse with AIFeedback
FE-B 2025 Autumn

ITPEC FE Subject B October 2025 — Question 1 of 20

Question 1

From the answer group below, select the correct combination of answers to be inserted into A and B in the program. Here, the array index starts at 1.

The function sum receives an integer array array with at least two elements and two positive integers k and m (k < m ≤ number of elements in array). It calculates the sum of even elements of the array array whose indices are from k to m.

[Program]
○ integer: sum(integer []: array, integer: k, integer: m)
integer: s ← 0
integer: i ← k
while (i ≤ m)
if (A)
s ← s + array[i]
endif
B
endwhile
return s

Answer group

OptionAB

ITPEC FE Subject B October 2025 — Question 2 of 20

Question 2

From the answer group below, select the correct combination of answers to be inserted into A and B in the program. Here, the array index starts at 1.

In statistics, the mode is the value that occurs most frequently in a dataset. For example, the mode of the integer array {2, 1, 1, 9, 6, 6, 2, 5, 6} is 6, as it occurs most often. The function findMode receives an integer array arr as a dataset and returns the mode for it.

[Program]
○ integer: findMode(integer []: arr)
integer: n ← the number of elements in arr
integer: m ← arr[1] /* Current mode value */
integer: m_c ← 1 /* Frequency count of mode */
integer: c, i, j
for (increase i from 1 to n - 1 by 1)
c ← 1
for (increase j from i + 1 to n by 1)
if (A)
c ← c + 1
endif
endfor
if (B)
m_c ← c
m ← arr[i]
endif
endfor
return m

Answer group

OptionAB

ITPEC FE Subject B October 2025 — Question 3 of 20

Question 3

From the answer group below, select the correct combination of answers to be inserted into A and B in the program. Here, the array index starts at 1.

Given an array of positive integers and a target sum, the problem is to find the subarray whose sum is equal to the target sum. A subarray is a part of the given array composed of contiguous elements. For example, when the target sum is 14, the shaded subarray in the figure satisfies the given condition.

63251173

Figure Example of an array

The procedure subArraySum receives an integer array arr and an integer value targetSum as arguments and finds the subarray whose sum is equal to the target sum. If a subarray that satisfies this condition is found, it prints their starting and ending indices, and finishes the task. Otherwise, it prints the message “No subarray found”.

[Program]
○ subArraySum(integer []: arr, integer: targetSum)
integer: sum, start, end
integer: N ← the number of elements in arr
for (increase start from 1 to N by 1)
sum ← 0
for (increase end from start to A by 1) // α
sum ← B
if (sum = targetSum)
output start, end
return
elseif (sum > targetSum)
exit the for block marked α
endif
endfor
endfor
output "No subarray found"

Answer group

OptionAB

ITPEC FE Subject B October 2025 — Question 4 of 20

Question 4

From the answer group below, select the correct combination of answers to be inserted into A through C in the program.

The procedure reverse_digits receives one positive integer argument named num and outputs both the original integer and the integer with its digits reversed. Assume that the ones digit of num is not 0.

Example:
Number is 456, output 654

Number is 23407, output 70432

[Program]
○ reverse_digits(integer: num)
integer: rev ← 0
integer: rm ← 0
integer: temp ← num
while (A)
rm ← temp mod 10
rev ← B
temp ← C
endwhile
output "Number is ", num, ", output ", rev

Answer group

OptionABC

ITPEC FE Subject B October 2025 — Question 5 of 20

Question 5

From the answer group below, select the correct combination of answers to be inserted into A and B in the program.

Prime numbers are the positive integers that are only divisible by the number itself and 1. Procedure printPrime receives the integer N (N ≥ 1) as an argument and prints the first N prime numbers. For example, printPrime(6) will print “2 3 5 7 11 13”.

[Program]
○ printPrime(integer: N)
integer: count, number, i
boolean: isPrime
count ← 1
number ← 2
while (count ≤ N)
isPrime ← true
for (increase i from 2 to integer part of the square root of number by 1)
if (number mod i = 0)
A
exit the for block
endif
endfor
if (isPrime = true)
output " ", number
B
endif
number ← number + 1
endwhile

Answer group

OptionAB

ITPEC FE Subject B October 2025 — Question 6 of 20

Question 6

From the answer group below, select the correct answer to be inserted into blank in the description.

Class Rectangle represents a two-dimensional figure, and class Cuboid represents a three-dimensional figure. The class Cuboid is a subclass of the class Rectangle. Figures 1 and 2 explain the classes Rectangle and Cuboid, respectively.

Member variableTypeDescription
lengthintegerDimension of length.
widthintegerDimension of width.
ConstructorDescription
Rectangle(integer: _length,integer: _width)Initialize member variable length with _length and member variable width with _width.
MethodReturn valueDescription
enlarge(Rectangle:shape)NoneTo increase the size, add shape.length to length and shape.width to width.
output()NoneOutput in format “(length, width)”.

Figure 1 Class Rectangle

Member variableTypeDescription
heightintegerDimension of height.
ConstructorDescription
Cuboid(integer: _length,integer: _width,integer: _height)Constructor of the super class is called with _length and _width as arguments in that order, and member variable height is initialized with the argument _height.
MethodReturn valueDescription
enlarge(Cuboid:shape)NoneTo increase the size, add shape.length to length, shape.width to width and shape.height to height.
output()NoneOutput in format “(length, width, height)”.

Figure 2 Class Cuboid

When the program is executed, it is expected to produce the output “blank”.

[Program]
Rectangle: f1 ← Rectangle(5, 2)
Cuboid: f2 ← Cuboid(9, 4, 7)
f1.enlarge(f2)
f1.output()

Answer group

ITPEC FE Subject B October 2025 — Question 7 of 20

Question 7

From the answer group below, select the correct combination of answers to be inserted into A and B in the program.

A singly linked list can be reversed using the following recursive procedure.

Let head be the first element of the list, and let elm be undefined.
(a) Reverse the order of the elements in the list starting from head, and set the next element of the last element in the reversed list—that is, the next element of head—to elm.

To “reverse the order of the elements in the list starting from head,” reverse the list starting from the next element of head, and then connect head to the end of the reversed list. In other words, execute (a) by setting head as elm, and the next element of head as head.

The recursive function reverseList reverses a singly linked list and returns the head of the reversed list. Initially, the function reverseList is called as reverseList(head, undefined). Here, head is the head of the singly linked list before reversal and is of type ListElement. The table provides an explanation of the member variables of the class ListElement. ListElement-type variables store references to instances of the class ListElement.

Table Explanation of the member variables of the class ListElement

Member variableTypeDescription
valintegerThe value of the element.
nextListElementReference to the next element, if there is no next element, the status is undefined.
[Program]
○ ListElement: reverseList(ListElement: head, ListElement: elm)
ListElement: listHead
if (head.next is not undefined)
listHead ← reverseList(A, head)
else
listHead ← head
endif
head.next ← B
return listHead

Answer group

OptionAB

ITPEC FE Subject B October 2025 — Question 8 of 20

Question 8

From the answer group below, select the correct combination of answers to be inserted into A and B in the program. Here, the array index starts at 1.

Stack stores data using first-in, last-out ordering. Here, the items stored in the stack are integer values, and the stack is controlled by the procedure push and the function pop. The procedure push adds an item given as an argument to the top of the stack, and the function pop removes the top item from the stack and returns it. The global variable stck is an array of 10 integers that stores the stack items, and the global variable tos is the pointer that points to the topmost item of the stack.

[Program]
global: integer []: stck ← {10 undefined}
global: integer: tos ← 0
○ push(integer: item)
if (tos = 10)
output "Stack is Full"
else
A
stck[tos] ← item
endif
○ integer: pop()
integer: item
if (tos < 1)
output "Stack is Empty"
return undefined
else
B
endif
return item

Answer group

OptionAB

ITPEC FE Subject B October 2025 — Question 9 of 20

Question 9

From the answer group below, select the correct answer to be inserted into blank in the description. Here, the array index starts at 1.

The procedure traverse traces through a vertex of the graph in Figure 1, and outputs all vertex numbers in the graph. One of the vertex numbers of the graph is specified with the argument k. The global 2-dimensional array graph represents the graph in Figure 1. Each element graph[i,j] is equal to 1 if there is an edge between vertices i and j, and 0 otherwise. The array visited stores boolean values, where visited[i] indicates whether vertex i of the graph has been visited or not during the procedure. When the procedure is called as traverse(1), the output is in the order blank.

12345

Figure 1 Graph that is handled by the program

Here, the procedure traverse uses a queue represented by the class Queue. Figure 2 provides an explanation of the class Queue.

ConstructorDescription
Queue()Creates an empty queue.
MethodReturn valueDescription
enqueue(integer: elm)NoneAdds the integer elm as an element to the queue.
dequeue()integerExtracts the element from the queue and returns it.
isEmpty()booleanReturns true if the queue is empty; otherwise, returns false.

Figure 2 Explanation of the class Queue

[Program]
global: integer [,]: graph ← {{0, 1, 0, 1, 0},
{1, 0, 1, 0, 1},
{0, 1, 0, 0, 0},
{1, 0, 0, 0, 1},
{0, 1, 0, 1, 0}}
○ traverse(integer: k)
Queue: queue ← Queue()
boolean []: visited ← {false, false, false, false, false}
integer: v, i
queue.enqueue(k)
visited[k] ← true
while (not queue.isEmpty())
v ← queue.dequeue()
output v
for (increase i from 1 to 5 by 1)
if (graph[v,i] = 1 and visited[i] = false)
queue.enqueue(i)
visited[i] ← true
endif
endfor
endwhile

Answer group

ITPEC FE Subject B October 2025 — Question 10 of 20

Question 10

From the answer group below, select the correct combination of answers to be inserted into A and B in the program.

The procedure insertAfter inserts an element into a singly linked list at the position after an existing element with a specific data value. The argument targetData is a string type data that represents the value of the existing element in the list, after which a new element is to be inserted. If no corresponding element exists, no action is taken. The argument newData is also a string type data represents the value of the new element to be inserted.
The class Element represents each element of the linked list. The figure explains the constructor and the member variables of the class Element. Element-type variables store references to instances of the class Element. A reference to the first element in the list is pre-stored in the global variable head.

ConstructorDescription
Element(string: data)Initialize the element with the data passed as an argument, which stored in the member variable data, with the member variable next set to undefined.
Member variableTypeDescription
datastringData associated with the element.
nextElementThis attribute represents the reference to the next element.

Figure Class Element

[Program]
global: Element: head // stores first element in the list
○ insertAfter(string: targetData, string: newData)
Element: x, y
x ← head
while(x is A)
if (x.data = targetData)
y ← Element(newData)
y.next ← B
x.next ← y
exit the while block
else
x ← x.next
endif
endwhile

Answer group

OptionAB
Questions 11–20

ITPEC FE Subject B October 2025 — Question 11 of 20

Question 11

From the answer group below, select the correct combination of answers to be inserted into A and B in the program. Here, the array index starts at 1.

The bubble sort compares adjacent elements in an array and swaps them if they are out of order. It makes multiple passes through an array. The bubble sort can be modified to stop early if it finds that the array has become sorted. The function quickBubble is modified from conventional bubble sort, which sorts the elements in ascending order, to recognize a sorted array and stop early. For example, the sorting of the unordered array {18, 1, 8, 6, 2, 9, 12, 14, 7, 11} is completed in six passes.

[Program]
○ integer []: quickBubble(integer []: array)
integer []: arraySorted ← array
boolean: exchange
integer: maxIdx, i
exchange ← true
maxIdx ← (the number of elements in arraySorted) - 1
while (A and B)
exchange ← false
for (increase i from 1 to maxIdx by 1)
if (arraySorted[i] > arraySorted[i + 1])
exchange ← true
swap the values of arraySorted[i] and arraySorted[i + 1]
endif
endfor
maxIdx ← maxIdx - 1
endwhile
return arraySorted

Answer group

OptionAB

ITPEC FE Subject B October 2025 — Question 12 of 20

Question 12

From the answer group below, select the correct combination of answers to be inserted into A and B in the program. Here, the array index starts at 1.

The function containsSubstring receives two-character arrays str and seq as arguments, and returns a boolean value indicating whether the character array str contains the sequence seq as a substring. The character array str contains seq as a substring if every sequence of consecutive characters in seq exists somewhere in the sequence of characters in str, in the same order. For example, containsSubstring({"a", "p", "p", "l", "e"}, {"p", "l", "e"}) returns true, and containsSubstring({"a", "p", "p", "l", "e"}, {"a", "e"}) returns false. Assume that the number of elements in str and seq is one or more.

[Program]
○ boolean: containsSubstring(character []: str, character []: seq)
integer: strlen, seqlen, len, i, j
strlen ← the number of elements in str
seqlen ← the number of elements in seq
if (seqlen > strlen)
return false
endif
len ← strlen - seqlen + 1
for (increase i from 1 to len by 1)
j ← 1
while (j ≤ seqlen)
if (A ≠ seq[j])
exit the while block
endif
j ← j + 1
endwhile
if (B)
return true
endif
endfor
return false

Answer group

OptionAB

ITPEC FE Subject B October 2025 — Question 13 of 20

Question 13

From the answer group below, select the correct combination of answers to be inserted into A through C in the program.

Binary Search Trees (BST) are a fundamental data structure where each node has at most two children: a left child and a right child. The key property of a BST is that each value of all nodes in its left subtree are less than the value of the node, and each value of all nodes in its right subtree are greater than the value of the node. The table shows the member variables of the class Node. Node-type variable holds a reference to an instance of the class Node. Each node in a BST has a different value.

Table Member variables of class Node

Member variableTypeDescription
keyintegerInteger to be stored in the node.
leftNodeReference to the instance that holds the left child of a binary tree. If no left child exists, it is undefined.
rightNodeReference to the instance that holds the right child of a binary tree. If no right child exists, it is undefined.

The function remove removes a node with the same key value as the argument key from the BST specified by the argument node and returns the resulting BST. The function searches for a node with the same key value, and if the found node (call it X here) does not have a right subtree, the function returns its left subtree. If X has a right subtree, the function locates the node (call it Y here) with the smallest key value in the right subtree, replaces the key value of X with that of Y, and then removes Y. If there is no node with the same key value in the BST, the function performs no operations. The procedure test demonstrates this behavior by removing 1 node from a BST containing 7 nodes. The figure shows the BST before and after node removal.

12345671345673remove 2

Figure BST before and after node removal

[Program]
○ Node: remove(Node: node, integer: key)
Node: node2
if (node is undefined)
return undefined
elseif (key < node.key)
node.left ← remove(node.left, key)
elseif (key > node.key)
node.right ← remove(node.right, key)
elseif (node.right is undefined)
return node.left
else
node2 ← A
while (B)
node2 ← node2.left
endwhile
node.key ← node2.key
node.right ← remove(node.right, C)
endif
return node
○ test()
Node: root ← the root node of BST on the left side of the figure
root ← remove(root, 2)

Answer group

OptionABC

ITPEC FE Subject B October 2025 — Question 14 of 20

Question 14

From the answer group below, select the correct answer to be inserted into blank in the program. Here, the array index starts at 1.

A 3 × 3 normal magic square is a 3 × 3 matrix where the sum of the elements for each row, each column, and each diagonal is the same. The square contains the numbers 1 to 9, exactly as shown in the figure.

4923578161515151515151515

Figure 3 × 3 normal magic square

The function checkMagicSquare receives a two-dimensional 3 × 3 integer array (matrix) m containing the numbers 1 to 9, and returns whether the given matrix is a magic square or not.

[Program]
○ boolean: checkMagicSquare(integer [,]: m)
integer: i, j, k
integer: dia1Sum ← 0
integer: dia2Sum ← 0
integer []: rowSum ← {0, 0, 0}
integer []: colSum ← {0, 0, 0}
for (increase i from 1 to 3 by 1)
for (increase j from 1 to 3 by 1)
rowSum[i] ← rowSum[i] + m[i,j]
colSum[i] ← colSum[i] + m[j,i]
endfor
dia1Sum ← dia1Sum + m[i,i]
dia2Sum ← dia2Sum + m[i,3 - i + 1]
endfor
if (dia1Sum ≠ dia2Sum)
return false
endif
for (increase k from 1 to 3 by 1)
if(blank)
return false
endif
endfor
return true

Answer group

ITPEC FE Subject B October 2025 — Question 15 of 20

Question 15

From the answer group below, select the correct combination of answers to be inserted into A and B in the program. Here, the array index starts at 1.

Inverse document frequency (IDF) is a metric used to evaluate the importance of a word in a document relative to a document collection. The function calcIDF receives a string term and an array of strings corpus as arguments, and calculates and returns the IDF score for the term based on the given corpus. The corpus of documents corpus is given as a string array. An example of corpus that indicates 3 documents is as follows:

{"ITPEC includes members from 6 countries",
"many students prepare for the exam",
"The ITPEC exam is essential for IT professionals"}

The table shows the description of the functions used in the program.

Table Functions

FunctionReturn valueDescription
split(string: str)string []Returns words separated by a space in the text str.
log(real: x)realReturns natural logarithm (base e) of the value x.

Traditionally, IDF is computed using the following formula:

IDF(t) = log ( N1 + df(t) )

Where N is the total number of documents, t refers to a specific term or word in a document, and df(t) is the number of documents containing the term t.

For example, the return value of calcIDF("ITPEC", corpus) is log(3 ÷ (1 + 2)) = 0 when array corpus is assigned as shown in the above example. Because the total number of documents is 3, and the total number of documents that include the word “ITPEC” is 2.

[Program]
○ real: calcIDF(string: term, string []: corpus)
integer: i, j, numDocs, numWords, termCount
boolean: isContainsTerm
real: idf
string []: words
termCount ← 0
numDocs ← the number of elements in corpus
for (increase i from 1 to numDocs by 1)
isContainsTerm ← false
words ← split(corpus[i])
numWords ← the number of elements in words
for (increase j from 1 to numWords by 1) // α
if (A)
isContainsTerm ← true
exit the for block marked α
endif
endfor
if (B)
termCount ← termCount + 1
endif
endfor
idf ← log(numDocs ÷ (1 + termCount)) /* Division is performed
in data type real */
return idf

Answer group

OptionAB

ITPEC FE Subject B October 2025 — Question 16 of 20

Question 16

From the answer group below, select the correct combination of answers to be inserted into blank in the program. Here, the array index starts at 0.

The Jaccard similarity index, J, measures the similarity between two sets by computing the ratio of the number of elements in their intersection to the number of elements in their union, i.e., J(A, B) = |A∩B| / |A∪B|, where A and B represent sets, ∩ and ∪ represent the intersection and the union set operations, respectively, and |…| is the operator to calculate the number of elements in a set. The intersection operation builds a new set taking members that are common to both sets; while the union operation builds a set taking all members of both sets, where each member will appear only once. For instance, A = {3, 4, 6, 7} and B = {2, 4, 5}, then A∩B = {4}, A ∪ B = {2, 3, 4, 5, 6, 7}, |A| = 4, | B| = 3, |A∩B| = 1, and |A∪B| = 6.

The function jaccardSimilarity calculates the Jaccard similarity stated above and returns it. The definitions of variables used in the function are stated in the below table.

Table Variable definitions

VariableExplanation
nANumber of elements in set A.
nBNumber of elements in set B.
iCountVariable for counting members of intersection set, i.e., for counting |A∩B|.
uCountVariable for counting members of union set, i.e., for counting |A∪B|.
foundVariable used to indicate whether the member has already been considered for union set or not.
[Program]
○ real: jaccardSimilarity(integer []: A, integer []: B)
integer: nA ← number of elements in A
integer: nB ← number of elements in B
integer: iCount ← 0
integer: uCount ← blank
boolean: found
for (increase i from 0 to nA - 1 by 1)
found ← false
for (increase j from 0 to nB - 1 by 1) // α
if (A[i] = B[j])
iCount ← iCount + 1
found ← true
exit the for block marked α
endif
endfor
if (found = false)
uCount ← uCount + 1
endif
endfor
return iCount ÷ uCount /* Division is done in data type real */

Answer group

ITPEC FE Subject B October 2025 — Question 17 of 20

Question 17

From the answer group below, select the most appropriate combination of answers to be inserted into A and B in the description.

Company P is a small business that recently formed a data analytics team to perform business data analytics using internal business data. This data is stored on a database system configured with a synchronous (real-time) mirror. The database is backed up regularly. The database servers and IT infrastructure are maintained by a third-party IT support provider.

A junior data analyst was mistakenly granted database superuser privileges to the production database. This decision was made due to a lack of security understanding in the company. The data analyst, unfamiliar with the sensitivity of their access level, was tasked with executing a series of routine database queries and migrations. However, due to an error in a script, the data analyst accidentally ran a command that dropped critical tables, resulting in a significant loss of data. This caused the company’s internal applications to stop working.

The company engaged their IT support provider, and the database system was quickly put back in service by A. To prevent this incident from happening again, their IT support provider recommended that the company implement B.

Answer group

OptionAB

ITPEC FE Subject B October 2025 — Question 18 of 20

Question 18

From the answer group below, select the most appropriate combination of answers to be inserted into A and B in the description.

Company Q is a mid-sized online retailer selling a wide range of daily necessities to a large number of general consumers. Customers are required to create an account and log in to the company’s e-commerce website to make purchases. The e-commerce website is constructed using an open-source content management system (CMS) with various plugins. It is hosted on the company’s on-premise web servers located in the Demilitarized Zone (DMZ). Customer data is stored in the database installed on the web server as well. Since the e-commerce site received orders from many customers, availability of the e-commerce website is critical, and the maximum tolerable downtime (MTD) is limited to one hour per week.
The server is protected by a packet filtering firewall that permits access only through ports 80 and 443. Mr. K is an administrator responsible for both the operations and security of the company’s e-commerce website. He maintains the configuration of the firewall and other security measures as well as patch management. For patching the company’s e-commerce website, compatibility testing is important to maintain website stability. It takes at least three days to complete compatibility testing for one component. Due to limited human resource, it is unrealistic to perform compatibility tests in parallel and finish them quickly. Therefore, the patch management rule is to apply patches for the web server’s OS and the core CMS components within a week of their release, while updates for other components including plugins are scheduled to be applied within six months. Patches for the web server’s OS and the core CMS components are released on a monthly basis, while updates for other components including plugins are released each month as well.

One day, Company Q’s e-commerce website was compromised and the database on the webserver was accessed by an unauthorized third party. The investigation revealed that this was caused by an unpatched vulnerability in a plugin enabled on the CMS. This plug-in was critical to the functioning of the e-commerce website. The latest version of the plugin, which includes a fix for this vulnerability, was released by the vendor three months ago. The exploitation of this vulnerability has been reported publicly since last month. Company Q was still conducting compatibility testing, and the update to the latest version was scheduled for a later time.

To prevent similar incidents from occurring, Mr. K is required to revise the patch management rules for Q’s e-commerce website. In consideration of the workload associated with compatibility testing, Mr. K proposed updating the patch management rule for the e-commerce website to A. Furthermore, as a protective measure to prevent the servers from exploitation during the interim period before patches are applied, Mr. K proposed B.

Answer group

OptionAB

ITPEC FE Subject B October 2025 — Question 19 of 20

Question 19

From the answer group below, select the correct combination of answers to be inserted into A and B in the description.

Company R is a software company that sells video editing software for consumers. The company has branch offices in multiple countries, all managed by its head office. In Company R’s customer support department, customer satisfaction surveys are sent to selected customer who have received support. The survey results are aggregated at each branch, and must be sent to the customer survey analysis team at the head office every day. Ms. T at the customer survey analysis team at the head office is responsible for managing and securing the survey data. The considerations for collecting survey data from each branch office are as follows:

  • •The employees responsible for sending the survey data at each branch office changes daily.
  • •At the head office, Ms. T in the customer survey analysis team is responsible for receiving and analyzing the survey data from the branch offices. After receiving the survey data from the branch offices, she saves the data to a shared folder that only the customer survey analysis team can access.
  • •The file size of survey data is large, so using inefficient encryption methods would take too much time and is therefore not suitable.
  • •Since the survey data contains confidential information, it must be ensured that no one other than the sender and the intended recipients can view the contents during transmission between the head office and branch offices.
  • •The key used to encrypt the files must be transmitted in a way that prevents it from being stolen by a man-in-the-middle attacker.
  • •There are many branch offices and it is not practical to visit each office in person to distribute keys.

Ms. T decided to adopt a new method in which the branch offices upload the survey data, encrypted using file encryption, to a shared folder. She set up this shared folder with access permissions granted to both the head office and branch office staff, and instructed the branch office staff to upload the encrypted survey data to it. Taking into account the considerations related to collecting information from the branches, Ms. T decided to use A as the encryption method. In this method, the key used for encrypting the survey data is encrypted using the public key of B .

Answer group

OptionAB

ITPEC FE Subject B October 2025 — Question 20 of 20

Question 20

From the answer group below, select the most appropriate combination of answers to be inserted into A and B in the description.

Company S is a software company that develops web applications. Some of web applications that Company S develops are open-sourced. The web application code is made publicly available in a repository accessible to anyone. These open-source web applications include features that interact with external services using API keys.

One day, an external security researcher reported to Company S’s security team that the code published in the company’s repository contained an API key. Company S immediately made the repository private and deactivated the API key. Upon further investigation, it was found that a developer on the web application development team accidentally hard-coded the API key when testing a new feature, and committed the code to the source code repository. As a result, this allowed unauthorized users to access external services using the API key.

To prevent a recurrence of such an incident, the security team has proposed adding a coding rule that instead of hard-coding the secrets including the API, use environment variables that allow the application code to be accessed dynamically. Additionally, the team suggested A to detect any secrets that might have been missed by this rule before committing code to a publicly accessible repository. Furthermore, to minimize damage in case any secrets still evade detection, he proposed B.

Answer group

OptionAB
LearnIPA
Review
History
Profile