MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / record_host

Function record_host

webapp_modern.py:3138–3156  ·  view source on GitHub ↗

Normalize and record a host value for vulnerable host counting

(candidate)

Source from the content-addressed store, hash-verified

3136 'unnumbered_units': unnumbered,
3137 # Mesh-wide health, rolled up server-side so a fleet of thousands is
3138 # one small object here instead of the browser crunching every node.
3139 'health': health_rollup,
3140 },
3141 })
3142
3143
3144@app.route('/api/mesh/control', methods=['POST'])
3145def mesh_control():
3146 """Start/stop one of this unit's monitors — the mesh's write endpoint.
3147
3148 Reachable two ways, both trusted:
3149 * a tagged peer Ragnar over the tailnet (the auth bypass in
3150 check_authentication lets THIS one POST through on WireGuard identity);
3151 * the local operator with a session (self-control, no network hop).
3152
3153 Everything actuable is allowlisted in `_mesh_apply_control`; there is no way
3154 to reach an arbitrary route from here.
3155 """
3156 if not mesh_available:
3157 return jsonify({'success': False, 'error': 'mesh_manager unavailable'}), 503
3158 data = request.get_json(silent=True) or {}
3159 result = _mesh_apply_control(data.get('feature'), data.get('action'))

Callers 1

sync_vulnerability_countFunction · 0.85

Calls 1

addMethod · 0.80

Tested by

no test coverage detected