This repository has been archived by the owner on Jan 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Asset Linking
Austin Songer, CISSP edited this page Dec 23, 2024
·
2 revisions
Asset linking is the process of associating a specific asset (e.g., server, application, database) with a POA&M item to provide context for the vulnerability or compliance finding. This relationship helps track which assets are affected by specific issues and ensures accurate remediation and accountability.
-
Contextual Understanding:
- Knowing which assets are affected by a vulnerability helps prioritize remediation based on the criticality of the asset.
-
Remediation Planning:
- Enables teams to assign resources and develop specific remediation plans for each affected asset.
-
Audit and Compliance:
- Demonstrates a clear relationship between findings and the assets in scope for compliance audits.
-
Accountability:
- Facilitates assigning responsibility to asset owners or teams for resolving issues.
-
Data Model:
- The
POAM
andAsset
models have a many-to-many relationship. - A
poam_assets
association table is used to store links between POA&M items and assets.
Example models:
poam_assets = db.Table( 'poam_assets', db.Column('poam_id', db.Integer, db.ForeignKey('poam.id'), primary_key=True), db.Column('asset_id', db.Integer, db.ForeignKey('assets.id'), primary_key=True) ) class POAM(db.Model): __tablename__ = 'poam' id = db.Column(db.Integer, primary_key=True) # Other fields... assets = db.relationship('Asset', secondary='poam_assets', back_populates='poam_items') class Asset(db.Model): __tablename__ = 'assets' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(255), nullable=False) poam_items = db.relationship('POAM', secondary='poam_assets', back_populates='assets')
- The
-
Asset Linking Logic:
- When a POA&M item is created or updated, you can link it to one or more assets.
Example code for linking an asset:
def link_asset_to_poam(poam_id, asset_data): poam_item = POAM.query.get(poam_id) if not poam_item: return None # Check if the asset already exists asset = Asset.query.filter_by(name=asset_data['name']).first() if not asset: # Create a new asset if it doesn't exist asset = Asset(name=asset_data['name'], description=asset_data.get('description')) db.session.add(asset) # Link the asset to the POA&M item poam_item.assets.append(asset) db.session.commit() return asset
-
Fetching Linked Assets:
- Retrieve all assets linked to a specific POA&M item:
def get_assets_for_poam(poam_id): poam_item = POAM.query.get(poam_id) return poam_item.assets if poam_item else []
-
UI Integration:
- Users can view and manage linked assets through the app’s interface:
- A list of linked assets is displayed for each POA&M item.
- Options to add, update, or remove linked assets are provided.
- Users can view and manage linked assets through the app’s interface:
-
Database Representation:
- In the database, the
poam_assets
table linkspoam.id
andassets.id
to establish the many-to-many relationship.
Example
poam_assets
entry:poam_id | asset_id --------|--------- 1 | 10 1 | 11 2 | 12
- In the database, the
-
Use Case Example:
- Suppose you have a POA&M item for a vulnerability affecting multiple servers.
- Assets "Server A" and "Server B" are linked to the POA&M item to indicate which systems require remediation.