NASA-AMMOS / NASA-AMMOS/BSL

Sample Policy Provider SecOp ordering creates intermediate list before appending to Action

Open
#54 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
14
Forks
9
Avg merge
2d 12h
Merged PRs (30d)
33

Description

Could be an optimization, some options:

  • Expose API in SecurityAction.h to set_at to avoid this list. BUT: it would be by-copy instead of by-move, The M-Array doesn't provide API for push_move_at - can only push_move without specifying location and set_at as pass-by-copy.

  • Creating a function in SecurityAction.h to "sort" the SecOp list using a PP-defined comparator, and using the m-lib's _special_sort API. This way, the actual ordering is still PP-specified

https://github.com/NASA-AMMOS/BSL/blob/046549ebdaedc8e7d1d6627f994145fb57a7b7af/src/policy_provider/SamplePolicyProvider.c#L220-L297

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/policy_provider/SamplePolicyProvider.c around lines 220-297 and review SecurityAction.h, focusing on how the SecOp list is ordered and appended. The issue presents multiple API and sorting options but does not select an approach; done would require an agreed implementation that avoids the intermediate list while preserving provider-defined ordering.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
security
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.