Skip to main content

Find cryptographic calls in an approved source directory

SECTIGO QUANTUM READY · PLATFORM TRAINING

Find cryptographic calls in an approved source directory

Loading video…

2:27 · English narration and captionsTranscriptDownload lesson

Use this task after native agent setup when source is available on an agent's machine. Authorize one directory, check local coverage, submit a managed scan and trace an inventory finding to its source location. Hosted provider connections are a separate workflow; this task does not need a GitHub or GitLab credential.

Recorded scope: real Linux native collector 0.27.4, unified package 0.51.512, real workspace job and evidence. The input is an owned example Python file containing a SHA-1 call. It is never executed. No external repository, provider or workspace responses are mocked. Package and example-directory preparation precede recording; configuration, local report, managed job and evidence review are shown. This demonstrates the foreground Linux path, not service deployment or all supported languages.

Prepare a bounded source directory​

  1. Obtain approval to read the intended source tree. Run under an account with only the filesystem permissions it needs.
  2. Download and verify the native package. Use the current distribution instructions for your platform.
  3. Select a narrow directory. Avoid approving a whole disk or home directory merely for convenience.
  4. Keep agent credentials outside the source tree and protected from other accounts.

The example contains:

import hashlib

def legacy_digest(data):
return hashlib.sha1(data).hexdigest()

This is demonstration input for static discovery, not a recommended cryptographic implementation. The lesson does not execute the function or establish its business purpose.

Authorize and inspect locally​

Add the exact approved absolute path to the agent's protected configuration, preserving other required settings:

{
"source": "approved-source-host",
"repositoryRoots": ["/srv/approved-project"]
}

The path must exist on the agent machine. An empty list permits no code targets. Use a stable source label so evidence can be attributed correctly. Cloud job submission does not grant access outside the local roots.

Run a local scan from the verified native package:

./agent/runtime/quantum-ready code /srv/approved-project \
--source approved-source-host --output local-report.json

Use a new output filename. The local command writes a report; it does not upload it. Inspect analysisComplete, file counts, parser errors and diagnostics. The recording's complete report finds the example SHA-1 call. That result is specific to this input and scanner version.

Run native diagnostics with the protected configuration and token file, then establish initial agent contact. Keep credential values out of shell history, screen captures and source control.

Queue and follow the real job​

  1. Enroll an agent with the code-scanning capability and start it with the approved local configuration.
  2. Open Discovery scans, then New agent scan.
  3. Name the job and select the code scanner.
  4. Enter the source directory's absolute path on the agent. Do not enter a repository website URL.
  5. Find and select the agent that can read that directory.
  6. Queue the scan and follow its result. Open the corresponding code observation in inventory.

The agent resolves and checks the requested target against its local roots. Respect a refusal; obtain approval and correct the configuration instead of widening filesystem permissions indiscriminately.

Trace the finding to evidence​

Open observation metadata and review:

FieldHow to use it
Path, line and columnLocate the candidate call in the inspected source.
File SHA-256Identify the bytes inspected; compare with the source revision you are reviewing.
Detector and resolved APIUnderstand what recognized the candidate and whether import resolution succeeded.
Algorithm and unknown dimensionsKeep the recognized algorithm separate from unproven authentication, key establishment or purpose.
Runtime-use verificationStatic discovery does not prove that a call executes.
Coverage/job/attemptIdentify the analysis completeness and specific job attempt that produced the evidence.

For this input, the result is digest.py:4 - SHA-1, resolved to hashlib.sha1, with runtime use unverified. Work with the source owner to understand purpose and compatibility before planning a replacement. A numerical risk score does not authorize a code change by itself.

Recover from common problems​

SymptomNext step
Target is outside allowed rootsCheck the path on the agent machine and its approved configuration. Obtain permission before changing scope.
Local parsing failsInspect the parser diagnostics and supported language/version guidance. Do not treat incomplete analysis as clean.
Files are skipped or a limit is reachedReview exclusions and diagnostics; choose a narrower relevant directory and run a new scan.
No findingsCheck coverage and scanner version. No findings is not proof that the project has no cryptography.
Runtime purpose remains unknownReview code and application behavior with its owner. Static API recognition alone cannot establish execution or security purpose.

The video demonstrates the successful bounded task. It does not exercise every failure described above or establish exhaustive language and detector coverage. For pipeline automation and SARIF, see CI scanning. For provider-hosted scanning, see the private repository lesson.

Recap and cleanup​

You authorized a directory, reviewed local analysis coverage, ran a managed job and traced the finding to source metadata. The recording verifies that its example file is unchanged, removes its private working directory and revokes/archives the temporary agent. It keeps the historical workspace evidence. Apply your retention policy to real reports and do not delete an application's source as part of agent cleanup.

Narration transcript​

Use the player's captions and transcript controls, or download the full transcript. The lesson opens with its purpose and place in the sequence and ends with a recap and limitations.