Skip to content

Go: refactor EncryptionOperation#21745

Merged
owen-mc merged 1 commit intogithub:mainfrom
owen-mc:go/refactor-encryption-operation
Apr 22, 2026
Merged

Go: refactor EncryptionOperation#21745
owen-mc merged 1 commit intogithub:mainfrom
owen-mc:go/refactor-encryption-operation

Conversation

@owen-mc
Copy link
Copy Markdown
Contributor

@owen-mc owen-mc commented Apr 22, 2026

No description provided.

@owen-mc owen-mc added the no-change-note-required This PR does not need a change note label Apr 22, 2026
Copilot AI review requested due to automatic review settings April 22, 2026 12:27
@owen-mc owen-mc requested a review from a team as a code owner April 22, 2026 12:27
@github-actions github-actions Bot added the Go label Apr 22, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors Go QL cryptography modeling by changing EncryptionOperation to use abstract accessor methods for its key data-flow nodes, and updating existing implementations to follow the new pattern.

Changes:

  • Replace EncryptionOperation’s stored encryptionFlowTarget/inputNode fields with abstract methods getEncryptionFlowTarget() and getInputNode().
  • Update EncryptionMethodCall to implement these accessors and adjust its constructor to only constrain required nodes’ existence.
  • Update crypto/cipher StreamReader and StreamWriter models to store necessary nodes locally and implement the new accessors.
Show a summary per file
File Description
go/ql/lib/semmle/go/frameworks/CryptoLibraries.qll Updates StreamReader/StreamWriter implementations to override the new EncryptionOperation accessors.
go/ql/lib/semmle/go/Concepts.qll Refactors EncryptionOperation to require accessors and updates EncryptionMethodCall accordingly.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

Co-authored-by: Copilot <copilot@github.com>
@owen-mc owen-mc force-pushed the go/refactor-encryption-operation branch from 677dbcb to 57eaed4 Compare April 22, 2026 12:37
Copy link
Copy Markdown
Contributor

@aschackmull aschackmull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@owen-mc
Copy link
Copy Markdown
Contributor Author

owen-mc commented Apr 22, 2026

DCA was uneventful.

@owen-mc owen-mc merged commit d6abd4c into github:main Apr 22, 2026
18 checks passed
@owen-mc owen-mc deleted the go/refactor-encryption-operation branch April 22, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Go no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants